Prechádzať zdrojové kódy

Added optional build environment check: add extended regular
expressions to conf/checkregexps, one per line.

Improved directory structure.

Maxim Kammerer 14 rokov pred
rodič
commit
1541f2ba89
14 zmenil súbory, kde vykonal 25 pridanie a 12 odobranie
  1. 13 0
      check
  2. 0 0
      conf/pubkeys
  3. 0 0
      conf/rootfs-cp.excludes
  4. 0 0
      conf/rootfs.excludes
  5. 0 0
      conf/rootfs.includes
  6. 0 0
      conf/rootfs.sort
  7. 0 0
      conf/version
  8. 0 0
      doc/logo/McXe.svg
  9. 0 0
      doc/logo/liberte-logo.svg
  10. 0 0
      doc/logo/pepsi-liberty.svg
  11. 1 1
      enter
  12. 1 1
      mkdist
  13. 2 2
      mkimage
  14. 8 8
      mkroot

+ 13 - 0
check

@@ -13,6 +13,7 @@ fi
 
 
 # Variables
+SRC=`dirname $0`
 LIVECD=$1/copy
 FIND="chroot ${LIVECD} find / -xdev"
 
@@ -79,3 +80,15 @@ sinfo "SUID/SGID:"
 ${FIND} -type f -perm /u+s      -printf '%M %u %g\t%p\n'
 ${FIND} -type f -perm /g+s,o+w  -printf '%M %u %g\t%p\n'
 ${FIND} -type d -perm /a+st,o+w -printf '%M %u %g\t%p\n'
+
+sinfo "Build environment:"
+if [ -e ${SRC}/conf/checkregexps ]; then
+    regexps=`cat ${SRC}/conf/checkregexps | tr '\n' '|' | sed 's/^/(/; s/|$/)/'`
+    chroot ${LIVECD}/../src grep   -iE "${regexps}" /usr/src/linux/arch/x86/boot/compressed/vmlinux.bin
+    chroot ${LIVECD}        lzgrep -iE "${regexps}" /boot/initrd-x86.lzm
+    ${FIND} -type f ! -name '*.mo' ! -name 'words.*' ! -name '*.rws' \
+        ! -name 'libgucharmap.so.*' ! -name oui.txt \
+        | chroot ${LIVECD} xargs grep -liE "${regexps}"
+else
+    echo "checkregexp file not found, skipping"
+fi

+ 0 - 0
pubkeys → conf/pubkeys


+ 0 - 0
rootfs-cp.excludes → conf/rootfs-cp.excludes


+ 0 - 0
rootfs.excludes → conf/rootfs.excludes


+ 0 - 0
rootfs.includes → conf/rootfs.includes


+ 0 - 0
rootfs.sort → conf/rootfs.sort


+ 0 - 0
version → conf/version


+ 0 - 0
logo/McXe.svg → doc/logo/McXe.svg


+ 0 - 0
logo/liberte-logo.svg → doc/logo/liberte-logo.svg


+ 0 - 0
logo/pepsi-liberty.svg → doc/logo/pepsi-liberty.svg


+ 1 - 1
enter

@@ -15,7 +15,7 @@ fi
 # Variables
 SRC=`dirname $0`/src
 
-version=`cat ${SRC}/../version`
+version=`cat ${SRC}/../conf/version`
 environment="VERSION=${version} LOGNAME=root USER=root HOME=/root HOSTNAME=liberte"
 for env in LANG TERM RSYNC_PROXY http_proxy https_proxy ftp_proxy no_proxy; do
     if printenv ${env} 1>/dev/null; then

+ 1 - 1
mkdist

@@ -17,7 +17,7 @@ SRC=`dirname $0`
 DIST=$1/dist
 # SVN=https://liberte.svn.sourceforge.net/svnroot/liberte/tags
 
-version=`cat ${SRC}/version`
+version=`cat ${SRC}/conf/version`
 distname=liberte-${version}
 
 

+ 2 - 2
mkimage

@@ -17,7 +17,7 @@ SRC=`dirname $0`
 LIVECD=$1/copy
 USBROOT=$1/dist/liberte
 
-version=`cat ${SRC}/version`
+version=`cat ${SRC}/conf/version`
 distname=liberte-${version}
 
 # see the /root/bin/ps-mount script
@@ -56,7 +56,7 @@ sinfo "Creating SquashFS image"
 
 ${mksquashfs} ${LIVECD} ${USBROOT}/boot/root-x86.sfs -noappend \
     -no-exports -no-progress \
-    -sort ${SRC}/rootfs.sort -e boot
+    -sort ${SRC}/conf/rootfs.sort -e boot
 chmod 644 ${USBROOT}/boot/root-x86.sfs
 
 

+ 8 - 8
mkroot

@@ -22,7 +22,7 @@ portage=${MIRROR}/snapshots/portage-latest.tar.bz2
 
 # Don't rely on the HKP outbounding port being open
 gpg_wwwserver='https://zimmermann.mayfirst.org/pks/lookup?op=get&search=0x${fpr}'
-gpg_keys=`sed '/^#/d; /^$/d; s/ //g' ${FROM}/pubkeys`
+gpg_keys=`sed '/^#/d; /^$/d; s/ //g' ${FROM}/conf/pubkeys`
 
 mfpl=https://support.mayfirst.org/raw-attachment/wiki/mfpl_certificate_authority/mfpl.crt
 
@@ -30,19 +30,19 @@ mfpl=https://support.mayfirst.org/raw-attachment/wiki/mfpl_certificate_authority
 # Copying and pruning
 if [ "$2" = copy ]; then
     sinfo "Copying ${LIVECD}/src to ${LIVECD}/copy"
-    rsync -aHAXS -x -i --delete-excluded          \
-        --include-from=${FROM}/rootfs.includes    \
-        --exclude-from=${FROM}/rootfs-cp.excludes \
+    rsync -aHAXS -x -i --delete-excluded               \
+        --include-from=${FROM}/conf/rootfs.includes    \
+        --exclude-from=${FROM}/conf/rootfs-cp.excludes \
         ${LIVECD}/src/ ${LIVECD}/copy | head -n 20
 
     sinfo "Done."
     exit
 elif [ "$2" = clean ]; then
     sinfo "Pruning ${LIVECD}/copy"
-    rsync -aHAXS -x -i --delete-excluded          \
-        --include-from=${FROM}/rootfs.includes    \
-        --exclude-from=${FROM}/rootfs.excludes    \
-        --exclude-from=${FROM}/rootfs-cp.excludes \
+    rsync -aHAXS -x -i --delete-excluded               \
+        --include-from=${FROM}/conf/rootfs.includes    \
+        --exclude-from=${FROM}/conf/rootfs.excludes    \
+        --exclude-from=${FROM}/conf/rootfs-cp.excludes \
         ${LIVECD}/copy/ ${LIVECD}/copy | head
 
     ${FROM}/check ${LIVECD}