OSDN Git Service

[update] : Added Serene channel
authormk-linux419 <m.k419sabuaka@gmail.com>
Sat, 9 May 2020 14:10:52 +0000 (23:10 +0900)
committermk-linux419 <m.k419sabuaka@gmail.com>
Sat, 9 May 2020 14:10:52 +0000 (23:10 +0900)
channels/serene/airootfs/root/customize_airootfs.sh [new file with mode: 0644]
channels/serene/serene-list_key [new file with mode: 0644]
channels/serene/serene.list [new file with mode: 0644]
lubs

diff --git a/channels/serene/airootfs/root/customize_airootfs.sh b/channels/serene/airootfs/root/customize_airootfs.sh
new file mode 100644 (file)
index 0000000..def5177
--- /dev/null
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+echo "customize_airootfs.sh has been executed."
\ No newline at end of file
diff --git a/channels/serene/serene-list_key b/channels/serene/serene-list_key
new file mode 100644 (file)
index 0000000..7709e8f
--- /dev/null
@@ -0,0 +1 @@
+ url="https://osdn.net/projects/serene/storage/repo/serene/pub.key"
diff --git a/channels/serene/serene.list b/channels/serene/serene.list
new file mode 100644 (file)
index 0000000..104912e
--- /dev/null
@@ -0,0 +1,8 @@
+## SereneLinux package repository list
+## edited in 23 Apr 2020
+
+## Stable Package Repository
+deb [arch=amd64] http://osdn.net/projects/serene/storage/repo/serene ubuntu main
+
+## Untable Package Repository
+#deb [arch=amd64] http://xn--d-8o2b.com/repo/serene ubuntu main
diff --git a/lubs b/lubs
index befa928..aa3eff4 100755 (executable)
--- a/lubs
+++ b/lubs
@@ -123,6 +123,21 @@ make_basefs() {
 
 make_sourcelist() {
     cp ${script_path}/source.list.d/${codename}/* ${work_dir}/airootfs/etc/apt
+    run_cmd apt-get update
+
+    if [[ -f "${channels_dir}/${channel_name}/${channel_name}.list" ]] && [[ -f "${channels_dir}/${channel_name}/${channel_name}-list_key" ]]; then
+        source ${channels_dir}/${channel_name}/${channel_name}-list_key
+
+        if [[ ! -f "${cache_dir}/${channel_name}.key" ]]; then
+            wget -q -O ${cache_dir}/${channel_name}.key "${url}"
+        fi
+
+        _apt_install gnupg
+        cp ${cache_dir}/${channel_name}.key ${work_dir}/airootfs/${channel_name}.key
+        run_cmd apt-key add ${channel_name}.key
+        cp ${channels_dir}/${channel_name}/${channel_name}.list ${work_dir}/airootfs/etc/apt/sources.list.d
+        run_cmd apt-get update
+    fi
 }
 
 make_systemd() {
@@ -132,7 +147,6 @@ make_systemd() {
 }
 
 make_packages() {
-    run_cmd apt-get update
     grep -h -v ^'#' "${channels_dir}/share/packages.x86_64" | grep -v "^$" > "${work_dir}/airootfs/installpkglist"
     grep -h -v ^'#' "${channels_dir}/${channel_name}/packages.x86_64" | grep -v "^$" >> "${work_dir}/airootfs/installpkglist"
     run_cmd env -i bash -c 'DEBIAN_FRONTEND=noninteractive apt-get --yes install $(echo $(<installpkglist))'