# HG changeset patch # User Aleksej Bobylev # Date 1367370406 0 # Node ID d805d3de4546d8889f1229ca6e0f0455be6e6614 # Parent 3f4d46548cfba120f8b09a0d2abd0b942af4b839 add tidy; up bc 1.06.95, tidy receipt; add compface* & xbm2xface; add cacerts [ looking current BLFS book (2013-04-27) ] diff -r 3f4d46548cfb -r d805d3de4546 bc/receipt --- a/bc/receipt Mon Apr 29 22:16:01 2013 +0200 +++ b/bc/receipt Wed May 01 01:06:46 2013 +0000 @@ -1,29 +1,32 @@ # SliTaz package receipt. PACKAGE="bc" -VERSION="1.06" +VERSION="1.06.95" CATEGORY="utilities" -SHORT_DESC="Bc is a cmdline calculator." +SHORT_DESC="Bc is a cmdline calculator" MAINTAINER="pankso@slitaz.org" -TARBALL="$PACKAGE-$VERSION.tar.gz" +LICENSE="GPL2 LGPL2.1" WEB_SITE="http://www.gnu.org/software/bc/" -WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL" +TARBALL="$PACKAGE-$VERSION.tar.bz2" +WGET_URL="http://alpha.gnu.org/gnu/$PACKAGE/$TARBALL" TAGS="calculator" -DEPENDS="" -BUILD_DEPENDS="flex" +DEPENDS="ncurses readline" +BUILD_DEPENDS="flex readline-dev texinfo" # Rules to configure and make the package. compile_rules() { - cd $src - ./configure $CONFIGURE_ARGS && make && - make DESTDIR=$DESTDIR install + ./configure \ + --with-readline \ + $CONFIGURE_ARGS && + make && + make install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - mkdir -p $fs/usr/bin - cp -a $_pkg/usr/bin/* $fs/usr/bin + mkdir -p $fs/usr/bin + cp -a $install/usr/bin/* $fs/usr/bin } diff -r 3f4d46548cfb -r d805d3de4546 bc/stuff/bc.desktop --- a/bc/stuff/bc.desktop Mon Apr 29 22:16:01 2013 +0200 +++ b/bc/stuff/bc.desktop Wed May 01 01:06:46 2013 +0000 @@ -11,4 +11,4 @@ Exec=bc Terminal=true Icon=accessories-calculator -Categories=Utility; +Categories=Utility;Calculator; diff -r 3f4d46548cfb -r d805d3de4546 cacerts/description.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cacerts/description.txt Wed May 01 01:06:46 2013 +0000 @@ -0,0 +1,6 @@ +The Public Key Inrastructure is used for many security issues in a Linux system. +In order for a certificate to be trusted, it must be signed by a trusted agent +called a Certificate Authority (CA). The certificates loaded by this section +are from the list on the Mozilla version control system and formats it into +a form used by OpenSSL-1.0.1e. The certificates can also be used by other +applications either directly of indirectly through openssl. diff -r 3f4d46548cfb -r d805d3de4546 cacerts/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cacerts/receipt Wed May 01 01:06:46 2013 +0000 @@ -0,0 +1,37 @@ +# SliTaz package receipt. + +PACKAGE="cacerts" +VERSION="1.87" +CATEGORY="security" +SHORT_DESC="Certificate Authority Certificates" +MAINTAINER="al.bobylev@gmail.com" +LICENSE="MPL2" +WEB_SITE="http://www.linuxfromscratch.org/blfs/view/svn/postlfs/cacerts.html" +TARBALL="$PACKAGE-$VERSION.txt" +WGET_URL="http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1" + +DEPENDS="openssl" +BUILD_DEPENDS="openssl" + +# Rules to configure and make the package. +compile_rules() +{ + mv -f *.txt certdata.txt && + cp -a $stuff/* $src && + ./make-ca.sh && + ./remove-expired-certs.sh $src/certs +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/etc/ssl/certs + cp -a $src/certs/*.pem $fs/etc/ssl/certs + cp -a $src/ca-bundle.crt $fs/etc/ssl +} + +post_install() +{ + echo "Rehash certificates:" + c_rehash +} diff -r 3f4d46548cfb -r d805d3de4546 cacerts/stuff/make-ca.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cacerts/stuff/make-ca.sh Wed May 01 01:06:46 2013 +0000 @@ -0,0 +1,96 @@ +#!/bin/sh +# Begin make-ca.sh +# Script to populate OpenSSL's CApath from a bundle of PEM formatted CAs +# +# The file certdata.txt must exist in the local directory +# Version number is obtained from the version of the data. +# +# Authors: DJ Lucas +# Bruce Dubbs +# +# Version 20120211 + +certdata="certdata.txt" + +if [ ! -r $certdata ]; then + echo "$certdata must be in the local directory" + exit 1 +fi + +REVISION=$(grep CVS_ID $certdata | cut -f4 -d'$') + +if [ -z "${REVISION}" ]; then + echo "$certfile has no 'Revision' in CVS_ID" + exit 1 +fi + +VERSION=$(echo $REVISION | cut -f2 -d" ") + +TEMPDIR=$(mktemp -d) +TRUSTATTRIBUTES="CKA_TRUST_SERVER_AUTH" +BUNDLE="ca-bundle.crt" +CONVERTSCRIPT="./make-cert.pl" +SSLDIR="${DESTDIR}/etc/ssl" + +mkdir "${TEMPDIR}/certs" + +# Get a list of staring lines for each cert +CERTBEGINLIST=$(grep -n "^# Certificate" "${certdata}" | cut -d ":" -f1) + +# Get a list of ending lines for each cert +CERTENDLIST=`grep -n "^CKA_TRUST_STEP_UP_APPROVED" "${certdata}" | cut -d ":" -f 1` + +# Start a loop +for certbegin in ${CERTBEGINLIST}; do + for certend in ${CERTENDLIST}; do + if test "${certend}" -gt "${certbegin}"; then + break + fi + done + + # Dump to a temp file with the name of the file as the beginning line number + sed -n "${certbegin},${certend}p" "${certdata}" > "${TEMPDIR}/certs/${certbegin}.tmp" +done + +unset CERTBEGINLIST CERTDATA CERTENDLIST certebegin certend + +mkdir -p certs +touch certs/dummy +rm certs/* # Make sure the directory is clean + +for tempfile in ${TEMPDIR}/certs/*.tmp; do + # Make sure that the cert is trusted... + grep "CKA_TRUST_SERVER_AUTH" "${tempfile}" | \ + egrep "TRUST_UNKNOWN|NOT_TRUSTED" > /dev/null + + if test "${?}" = "0"; then + # Throw a meaningful error and remove the file + cp "${tempfile}" tempfile.cer + perl ${CONVERTSCRIPT} > tempfile.crt + keyhash=$(openssl x509 -noout -in tempfile.crt -hash) + echo "Certificate ${keyhash} is not trusted! Removing..." + rm -f tempfile.cer tempfile.crt "${tempfile}" + continue + fi + + # If execution made it to here in the loop, the temp cert is trusted + # Find the cert data and generate a cert file for it + + cp "${tempfile}" tempfile.cer + perl ${CONVERTSCRIPT} > tempfile.crt + keyhash=$(openssl x509 -noout -in tempfile.crt -hash) + mv tempfile.crt "certs/${keyhash}.pem" + rm -f tempfile.cer "${tempfile}" + echo "Created ${keyhash}.pem" +done + +# Remove blacklisted files +# MD5 Collision Proof of Concept CA +if test -f certs/8f111d69.pem; then + echo "Certificate 8f111d69 is not trusted! Removing..." + rm -f certs/8f111d69.pem +fi + +# Finally, generate the bundle and clean up. +cat certs/*.pem > ${BUNDLE} +rm -r "${TEMPDIR}" diff -r 3f4d46548cfb -r d805d3de4546 cacerts/stuff/make-cert.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cacerts/stuff/make-cert.pl Wed May 01 01:06:46 2013 +0000 @@ -0,0 +1,49 @@ +#!/usr/bin/perl -w + +# Used to generate PEM encoded files from Mozilla certdata.txt. +# Run as ./mkcrt.pl > certificate.crt +# +# Parts of this script courtesy of RedHat (mkcabundle.pl) +# +# This script modified for use with single file data (tempfile.cer) extracted +# from certdata.txt, taken from the latest version in the Mozilla NSS source. +# mozilla/security/nss/lib/ckfw/builtins/certdata.txt +# +# Authors: DJ Lucas +# Bruce Dubbs +# +# Version 20120211 + +my $certdata = './tempfile.cer'; + +open( IN, "cat $certdata|" ) + || die "could not open $certdata"; + +my $incert = 0; + +while ( ) +{ + if ( /^CKA_VALUE MULTILINE_OCTAL/ ) + { + $incert = 1; + open( OUT, "|openssl x509 -text -inform DER -fingerprint" ) + || die "could not pipe to openssl x509"; + } + + elsif ( /^END/ && $incert ) + { + close( OUT ); + $incert = 0; + print "\n\n"; + } + + elsif ($incert) + { + my @bs = split( /\\/ ); + foreach my $b (@bs) + { + chomp $b; + printf( OUT "%c", oct($b) ) unless $b eq ''; + } + } +} diff -r 3f4d46548cfb -r d805d3de4546 cacerts/stuff/remove-expired-certs.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cacerts/stuff/remove-expired-certs.sh Wed May 01 01:06:46 2013 +0000 @@ -0,0 +1,53 @@ +#!/bin/sh +# Begin /bin/remove-expired-certs.sh +# +# Version 20120211 + +# Make sure the date is parsed correctly on all systems +mydate() +{ + local y=$( echo $1 | cut -d" " -f4 ) + local M=$( echo $1 | cut -d" " -f1 ) + local d=$( echo $1 | cut -d" " -f2 ) + local m + + if [ ${d} -lt 10 ]; then d="0${d}"; fi + + case $M in + Jan) m="01";; + Feb) m="02";; + Mar) m="03";; + Apr) m="04";; + May) m="05";; + Jun) m="06";; + Jul) m="07";; + Aug) m="08";; + Sep) m="09";; + Oct) m="10";; + Nov) m="11";; + Dec) m="12";; + esac + + certdate="${y}${m}${d}" +} + +OPENSSL=/usr/bin/openssl +DIR=$DESTDIR/etc/ssl/certs + +if [ $# -gt 0 ]; then + DIR="$1" +fi + +certs=$( find ${DIR} -type f -name "*.pem" -o -name "*.crt" ) +today=$( date +%Y%m%d ) + +for cert in $certs; do + notafter=$( $OPENSSL x509 -enddate -in "${cert}" -noout ) + date=$( echo ${notafter} | sed 's/^notAfter=//' ) + mydate "$date" + + if [ ${certdate} -lt ${today} ]; then + echo "${cert} expired on ${certdate}! Removing..." + rm -f "${cert}" + fi +done diff -r 3f4d46548cfb -r d805d3de4546 compface-dev/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compface-dev/receipt Wed May 01 01:06:46 2013 +0000 @@ -0,0 +1,20 @@ +# SliTaz package receipt. + +PACKAGE="compface-dev" +VERSION="1.5.2" +CATEGORY="development" +SHORT_DESC="Development files for compface" +MAINTAINER="al.bobylev@gmail.com" +LICENSE="MIT" +WEB_SITE="http://freecode.com/projects/compface" + +DEPENDS="compface" +WANTED="compface" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr + cp -a $install/usr/include $fs/usr + cp -a $install/usr/lib $fs/usr +} diff -r 3f4d46548cfb -r d805d3de4546 compface/description.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compface/description.txt Wed May 01 01:06:46 2013 +0000 @@ -0,0 +1,2 @@ +Compface provides utilities and a library to convert from/to X-Face format, a +48x48 bitmap format used to carry thumbnails of email authors in a mail header. diff -r 3f4d46548cfb -r d805d3de4546 compface/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compface/receipt Wed May 01 01:06:46 2013 +0000 @@ -0,0 +1,29 @@ +# SliTaz package receipt. + +PACKAGE="compface" +VERSION="1.5.2" +CATEGORY="utilities" +SHORT_DESC="Utils & libs to convert from/to X-Face format" +MAINTAINER="al.bobylev@gmail.com" +LICENSE="MIT" +WEB_SITE="http://freecode.com/projects/compface" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WGET_URL="http://ftp.xemacs.org/pub/xemacs/aux/$TARBALL" + +DEPENDS="glibc-base" + +# Rules to configure and make the package. +compile_rules() +{ + patch < $stuff/makefile-use-destdir.patch && + ./configure $CONFIGURE_ARGS && + make && + make install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr + cp -a $install/usr/bin $fs/usr +} diff -r 3f4d46548cfb -r d805d3de4546 compface/stuff/makefile-use-destdir.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/compface/stuff/makefile-use-destdir.patch Wed May 01 01:06:46 2013 +0000 @@ -0,0 +1,31 @@ +--- Makefile.in ++++ Makefile.in +@@ -74,19 +74,15 @@ + $(RM) -rf `cat .fname` .fname + + install: $(NAMEEXE) $(UNNAMEEXE) $(LIBNAME) +- $(INSTALL_PROGRAM) -d $(BINDIR) $(LIBDIR) $(MAN1DIR) $(MAN3DIR) $(INCLUDEDIR) +- $(INSTALL_PROGRAM) $(srcdir)/$(NAMEEXE) $(EXECUTABLE) +- -chmod 0755 $(EXECUTABLE) +- -strip $(EXECUTABLE) +- $(INSTALL_PROGRAM) $(srcdir)/$(UNNAMEEXE) $(UNEXECUTABLE) +- -chmod 0755 $(UNEXECUTABLE) +- -strip $(UNEXECUTABLE) +- $(INSTALL_DATA) $(srcdir)/$(NAME).1 $(MAN1DIR)/$(NAME).1 +- cd $(MAN1DIR) && $(RM) ./$(UNNAME).1 && $(LN_S) $(NAME).1 $(UNNAME).1 +- $(INSTALL_DATA) $(srcdir)/$(NAME).3 $(MAN3DIR)/$(NAME).3 +- cd $(MAN3DIR) && $(RM) ./$(UNNAME).3 && $(LN_S) $(NAME).3 $(UNNAME).3 +- for hdr in $(INSTALLHEADERS); do $(INSTALL_DATA) $(srcdir)/$${hdr} $(INCLUDEDIR)/$${hdr}; done +- $(INSTALL_DATA) $(srcdir)/$(LIBNAME) $(LIBRARY) ++ $(INSTALL_PROGRAM) -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(MAN1DIR) $(DESTDIR)$(MAN3DIR) $(DESTDIR)$(INCLUDEDIR) ++ $(INSTALL_PROGRAM) -m755 $(srcdir)/$(NAMEEXE) $(DESTDIR)$(EXECUTABLE) ++ $(INSTALL_PROGRAM) -m755 $(srcdir)/$(UNNAMEEXE) $(DESTDIR)$(UNEXECUTABLE) ++ $(INSTALL_DATA) $(srcdir)/$(NAME).1 $(DESTDIR)$(MAN1DIR)/$(NAME).1 ++ cd $(DESTDIR)$(MAN1DIR) && $(RM) ./$(UNNAME).1 && $(LN_S) $(NAME).1 $(UNNAME).1 ++ $(INSTALL_DATA) $(srcdir)/$(NAME).3 $(DESTDIR)$(MAN3DIR)/$(NAME).3 ++ cd $(DESTDIR)$(MAN3DIR) && $(RM) ./$(UNNAME).3 && $(LN_S) $(NAME).3 $(UNNAME).3 ++ for hdr in $(INSTALLHEADERS); do $(INSTALL_DATA) $(srcdir)/$${hdr} $(DESTDIR)$(INCLUDEDIR)/$${hdr}; done ++ $(INSTALL_DATA) $(srcdir)/$(LIBNAME) $(DESTDIR)$(LIBRARY) + + shar : + shar.script $(OTHERS) $(HDRS) $(SOURCES) > $(NAME).sh diff -r 3f4d46548cfb -r d805d3de4546 tidy-dev/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tidy-dev/receipt Wed May 01 01:06:46 2013 +0000 @@ -0,0 +1,20 @@ +# SliTaz package receipt. + +PACKAGE="tidy-dev" +VERSION="cvs_20101110" +CATEGORY="development" +SHORT_DESC="Development files for HTML Tidy" +MAINTAINER="al.bobylev@gmail.com" +LICENSE="MIT" +WEB_SITE="http://tidy.sourceforge.net/" + +DEPENDS="tidy" +WANTED="tidy" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib + cp -a $install/usr/include $fs/usr + cp -a $install/usr/lib/*.la $fs/usr/lib +} diff -r 3f4d46548cfb -r d805d3de4546 tidy/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tidy/receipt Wed May 01 01:06:46 2013 +0000 @@ -0,0 +1,34 @@ +# SliTaz package receipt. + +PACKAGE="tidy" +VERSION="cvs_20101110" +CATEGORY="development" +SHORT_DESC="HTML Tidy" +MAINTAINER="al.bobylev@gmail.com" +LICENSE="MIT" +WEB_SITE="http://tidy.sourceforge.net/" +TARBALL="$PACKAGE-$VERSION.tar.bz2" +WGET_URL="http://anduin.linuxfromscratch.org/sources/BLFS/svn/t/$TARBALL" + +DEPENDS="glibc-base" + +# Rules to configure and make the package. +compile_rules() +{ + ./configure \ + --disable-debug \ + --disable-static \ + --enable-access \ + --enable-utf16 \ + --enable-asian && + make && + make install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/lib + cp -a $install/usr/bin $fs/usr + cp -a $install/usr/lib/*.so* $fs/usr/lib +} diff -r 3f4d46548cfb -r d805d3de4546 xbm2xface/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xbm2xface/receipt Wed May 01 01:06:46 2013 +0000 @@ -0,0 +1,19 @@ +# SliTaz package receipt. + +PACKAGE="xbm2xface" +VERSION="1.5.2" +CATEGORY="utilities" +SHORT_DESC="Compface utility xbm2xface" +MAINTAINER="al.bobylev@gmail.com" +LICENSE="MIT" +WEB_SITE="http://freecode.com/projects/compface" + +DEPENDS="compface perl" +WANTED="compface" + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + mkdir -p $fs/usr/bin + install -Dm755 $src/xbm2xface.pl $fs/usr/bin +}