aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cvsignore43
-rw-r--r--.gitignore2
-rw-r--r--Makefile35
-rw-r--r--Makefile.am12
-rw-r--r--README6
-rw-r--r--dumpelf.c6
-rwxr-xr-xlddtree.py4
-rwxr-xr-xlddtree.sh5
-rw-r--r--macho.h1
-rwxr-xr-xmake-tarball.sh75
-rw-r--r--man/fragment/version2
-rw-r--r--paxelf.c1
-rw-r--r--paxelf.h1
-rw-r--r--paxinc.c1
-rw-r--r--paxinc.h6
-rw-r--r--paxmacho.c1
-rw-r--r--paxmacho.h1
-rw-r--r--porting.h1
-rw-r--r--pspax.c5
-rw-r--r--scanelf.c6
-rw-r--r--scanmacho.c6
-rwxr-xr-xtests/source/dotest4
-rw-r--r--xfuncs.c1
-rw-r--r--xfuncs.h1
24 files changed, 104 insertions, 122 deletions
diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index a121e02..0000000
--- a/.cvsignore
+++ /dev/null
@@ -1,43 +0,0 @@
-*bz2
-*~
-*.[adio]
-*.l[ao]
-*.gdb
-*.pyc
-*.deps
-*.libs
-
-*.patch
-*.orig
-*.rej
-*.diff
-pax-utils-*
-contrib
-
-a.out*
-lib*.so*
-core
-.gdb_history
-.gdbinit
-
-aclocal.m4
-autom4te.cache
-build
-config.cache
-config.h
-config.h.in
-config.log
-config.status
-configure
-autotools
-libtool
-Makefile.in
-stamp-h1
-
-dumpelf
-pspax
-scanelf
-scanmacho
-
-.git
-*.x
diff --git a/.gitignore b/.gitignore
index 394adca..4e0d5fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,5 +40,3 @@ stamp-h1
/scanmacho
/man/*.1
-
-CVS
diff --git a/Makefile b/Makefile
index 2f9e60b..8048d58 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,5 @@
# Copyright 2003-2006 Ned Ludd <solar@linbsd.net>
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-projects/pax-utils/Makefile,v 1.88 2015/02/28 22:49:13 vapier Exp $
####################################################################
check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; \
@@ -48,7 +47,10 @@ endif
ifdef PV
override CPPFLAGS += -DVERSION=\"$(PV)\"
+else
+VCSID := $(shell git describe --tags HEAD)
endif
+override CPPFLAGS += -DVCSID='"$(VCSID)"'
####################################################################
ELF_TARGETS = scanelf dumpelf $(shell echo | $(CC) -dM -E - | grep -q __svr4__ || echo pspax)
@@ -131,32 +133,13 @@ endif
PN = pax-utils
P = $(PN)-$(PV)
dist:
- @if [ "$(PV)" = "" ] ; then \
- echo "Please run 'make dist PV=<ver>'" ; \
- exit 1 ; \
- fi
+ ./make-tarball.sh $(PV)
+distcheck: dist
rm -rf $(P)
- mkdir $(P)
- cp -a CVS $(P)/
- cd $(P) && cvs up
- echo "<releaseinfo>$(PV)</releaseinfo>" > $(P)/man/fragment/version
- $(MAKE) -C $(P)/man
- sed -i '/AC_INIT/s:git:$(PV):' $(P)/configure.ac
- $(MAKE) -C $(P) autotools
- tar cf - $(P) --exclude=CVS --exclude=.cvsignore | xz > $(P).tar.xz
- @printf "\n ..... Making sure clean cvs build works ..... \n\n"
- set -e; \
- unset CFLAGS; \
- for t in all check clean debug check clean; do \
- $(MAKE) -C $(P) $$t; \
- done; \
- cd $(P); \
- ./configure -C; \
- for t in all check; do \
- $(MAKE) $$t; \
- done
+ tar xf $(P).tar.xz
+ $(MAKE) -C $(P)
+ $(MAKE) -C $(P) check
rm -rf $(P)
- du -b $(P).tar.xz
-include .depend
@@ -171,7 +154,7 @@ check test:
GEN_MARK_START = \# @@@ GEN START @@@ \#
GEN_MARK_END = \# @@@ GEN START @@@ \#
EXTRA_DIST = \
- $(shell find '(' -name CVS -prune ')' -o '(' -type f -print ')')
+ $(shell find -type f)
MAKE_MULTI_LINES = $(patsubst %,\\\\\n\t%,$(sort $(1)))
# 2nd level of indirection here is so the $(find) doesn't pick up
# files in EXTRA_DIST that get cleaned up ...
diff --git a/Makefile.am b/Makefile.am
index bcb7462..9f51139 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -44,28 +44,16 @@ EXTRA_DIST = autotools/m4/gnulib-cache.m4
# @@@ GEN START @@@ #
dist_man_MANS +=
EXTRA_DIST += \
- tests/CVS/Entries \
- tests/CVS/Repository \
- tests/CVS/Root \
tests/Makefile \
- tests/lddtree/CVS/Entries \
- tests/lddtree/CVS/Repository \
- tests/lddtree/CVS/Root \
tests/lddtree/Makefile \
tests/lddtree/dotest.cmp \
tests/lddtree/dotest.py \
tests/lddtree/dotest.sfx \
tests/lddtree/dotest.sh \
tests/lib.sh \
- tests/scanelf/CVS/Entries \
- tests/scanelf/CVS/Repository \
- tests/scanelf/CVS/Root \
tests/scanelf/Makefile \
tests/scanelf/dotest \
tests/scanelf/scanelf.simple.good \
- tests/source/CVS/Entries \
- tests/source/CVS/Repository \
- tests/source/CVS/Root \
tests/source/Makefile \
tests/source/dotest \
tests/source/space
diff --git a/README b/README
index 52f7f86..462e5ad 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
HOMEPAGE: http://hardened.gentoo.org/pax-utils.xml
-CVS: cvs -d :pserver:anonymous@anoncvs.gentoo.org:/var/cvsroot co gentoo-projects/pax-utils
-VIEWVCS: http://sources.gentoo.org/gentoo-projects/pax-utils/
+GIT: git clone git://git.overlays.gentoo.org/proj/pax-utils.git
+VIEWVCS: http://git.overlays.gentoo.org/gitweb/?p=proj/pax-utils.git
pax-utils is a small set of various PaX aware and related utilities for
ELF binaries. It was written for ELF Q/A on Gentoo systems but can be
@@ -23,7 +23,7 @@ see the homepage at http://pax.grsecurity.net/
(Gentoo)
http://www.gentoo.org/proj/en/hardened/pax-utils.xml
-http://sources.gentoo.org/viewcvs.py/gentoo-projects/pax-utils/
+http://git.overlays.gentoo.org/gitweb/?p=proj/pax-utils.git
Maintainer: solar@gentoo.org,vapier@gentoo.org
(openSUSE)
diff --git a/dumpelf.c b/dumpelf.c
index d81dcf1..3035b24 100644
--- a/dumpelf.c
+++ b/dumpelf.c
@@ -1,13 +1,11 @@
/*
* Copyright 2005-2012 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/dumpelf.c,v 1.33 2015/02/22 00:54:34 vapier Exp $
*
* Copyright 2005-2012 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2012 Mike Frysinger - <vapier@gentoo.org>
*/
-static const char rcsid[] = "$Id: dumpelf.c,v 1.33 2015/02/22 00:54:34 vapier Exp $";
const char argv0[] = "dumpelf";
#include "paxinc.h"
@@ -355,9 +353,9 @@ static void parseargs(int argc, char *argv[])
switch (flag) {
case 'V': /* version info */
- printf("pax-utils-%s: %s\n%s\n"
+ printf("pax-utils-%s: %s\n"
"%s written for Gentoo by <solar and vapier @ gentoo.org>\n",
- VERSION, __FILE__, rcsid, argv0);
+ VERSION, VCSID, argv0);
exit(EXIT_SUCCESS);
break;
case 'h': usage(EXIT_SUCCESS); break;
diff --git a/lddtree.py b/lddtree.py
index 9a2d205..4d1b15e 100755
--- a/lddtree.py
+++ b/lddtree.py
@@ -4,7 +4,6 @@
# Copyright 2012-2014 The Chromium OS Authors
# Use of this source code is governed by a BSD-style license (BSD-3)
# pylint: disable=C0301
-# $Header: /var/cvsroot/gentoo-projects/pax-utils/lddtree.py,v 1.56 2014/11/20 01:22:36 vapier Exp $
"""Read the ELF dependency tree and show it
@@ -447,8 +446,7 @@ def _NormalizePath(option, _opt, value, parser):
def _ShowVersion(_option, _opt, _value, _parser):
- d = '$Id: lddtree.py,v 1.56 2014/11/20 01:22:36 vapier Exp $'.split()
- print('%s-%s %s %s' % (d[1].split('.')[0], d[2], d[3], d[4]))
+ print('lddtree by Mike Frysinger <vapier@gentoo.org>')
sys.exit(0)
diff --git a/lddtree.sh b/lddtree.sh
index 523c778..a37d499 100755
--- a/lddtree.sh
+++ b/lddtree.sh
@@ -2,7 +2,6 @@
# Copyright 2007-2013 Gentoo Foundation
# Copyright 2007-2013 Mike Frysinger <vapier@gentoo.org>
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-projects/pax-utils/lddtree.sh,v 1.22 2013/04/07 19:20:09 vapier Exp $
argv0=${0##*/}
@@ -29,9 +28,7 @@ usage() {
}
version() {
- local id='$Id: lddtree.sh,v 1.22 2013/04/07 19:20:09 vapier Exp $'
- id=${id##*,v }
- exec echo "lddtree-${id% * Exp*}"
+ exec echo "lddtree by Mike Frysinger <vapier@gentoo.org>"
}
error() {
diff --git a/macho.h b/macho.h
index a08933b..09caba1 100644
--- a/macho.h
+++ b/macho.h
@@ -1,7 +1,6 @@
/*
* Copyright 2008-2012 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/macho.h,v 1.10 2013/12/16 20:30:38 grobian Exp $
*/
#ifndef _MACHO_H
diff --git a/make-tarball.sh b/make-tarball.sh
new file mode 100755
index 0000000..83caa75
--- /dev/null
+++ b/make-tarball.sh
@@ -0,0 +1,75 @@
+#!/bin/bash
+
+set -e
+
+if ! . /etc/init.d/functions.sh 2>/dev/null ; then
+ einfo() { printf ' * %b\n' "$*"; }
+ eerror() { einfo "$@" 1>&2; }
+fi
+die() { eerror "$@"; exit 1; }
+
+v() { printf '\t%s\n' "$*"; "$@"; }
+
+: ${MAKE:=make}
+
+if [[ $# -ne 1 ]] ; then
+ die "Usage: $0 <ver>"
+fi
+
+case $1 in
+snap) ver=$(date -u +%Y%m%d) ;;
+git) ver="HEAD" ;;
+*)
+ ver="v$1"
+ if ! git describe --tags "${ver}" >&/dev/null ; then
+ die "Please create the tag first: git tag ${ver}"
+ fi
+ ;;
+esac
+p="pax-utils-${ver#v}"
+
+rm -rf "${p}"
+mkdir "${p}"
+
+einfo "Checking out clean git sources ..."
+git archive "${ver}" | tar xf - -C "${p}"
+cd "${p}"
+
+einfo "Building autotools ..."
+sed -i "/^AC_INIT/s:git:${ver}:" configure.ac
+sed -i "1iPV := ${ver}" Makefile
+LC_ALL=C ${MAKE} -s autotools >/dev/null
+rm -rf autom4te.cache
+
+einfo "Building docs ..."
+echo "<releaseinfo>${ver#v}</releaseinfo>" > man/fragment/version
+make -C man
+cd ..
+
+einfo "Generating tarball ..."
+tar cf - "${p}" | xz > "${p}".tar.xz
+rm -r "${p}"
+du -b "${p}".tar.*
+
+einfo "Checking tarball (simple) ..."
+tar xf "${p}".tar.*
+pushd "${p}" >/dev/null
+v ${MAKE} -s
+v ${MAKE} -s check
+popd >/dev/null
+rm -rf "${p}"
+
+einfo "Checking tarball (autotools) ..."
+tar xf "${p}".tar.*
+pushd "${p}" >/dev/null
+v ./configure -q
+v ${MAKE} -s
+v ${MAKE} -s check
+popd >/dev/null
+rm -rf "${p}"
+
+echo
+einfo "All ready for distribution!"
+du -b "${p}".tar.*
+
+exit 0
diff --git a/man/fragment/version b/man/fragment/version
index 6ea022b..69ba922 100644
--- a/man/fragment/version
+++ b/man/fragment/version
@@ -1 +1 @@
-<releaseinfo>cvs</releaseinfo>
+<releaseinfo>git</releaseinfo>
diff --git a/paxelf.c b/paxelf.c
index f3de4df..bcc0251 100644
--- a/paxelf.c
+++ b/paxelf.c
@@ -1,7 +1,6 @@
/*
* Copyright 2003-2012 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxelf.c,v 1.81 2014/06/18 03:16:52 vapier Exp $
*
* Copyright 2005-2012 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2012 Mike Frysinger - <vapier@gentoo.org>
diff --git a/paxelf.h b/paxelf.h
index 1c1d672..0610516 100644
--- a/paxelf.h
+++ b/paxelf.h
@@ -1,7 +1,6 @@
/*
* Copyright 2005-2012 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxelf.h,v 1.61 2015/02/28 22:57:40 vapier Exp $
*
* Copyright 2005-2012 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2012 Mike Frysinger - <vapier@gentoo.org>
diff --git a/paxinc.c b/paxinc.c
index ea41dfb..b9a196b 100644
--- a/paxinc.c
+++ b/paxinc.c
@@ -1,7 +1,6 @@
/*
* Copyright 2003-2012 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxinc.c,v 1.16 2013/04/10 22:16:45 vapier Exp $
*
* Copyright 2005-2012 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2012 Mike Frysinger - <vapier@gentoo.org>
diff --git a/paxinc.h b/paxinc.h
index ea94dae..003877d 100644
--- a/paxinc.h
+++ b/paxinc.h
@@ -1,7 +1,6 @@
/*
* Copyright 2005-2012 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxinc.h,v 1.17 2012/11/04 07:26:24 vapier Exp $
*
* Copyright 2005-2012 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2012 Mike Frysinger - <vapier@gentoo.org>
@@ -16,7 +15,10 @@
#include "xfuncs.h"
#ifndef VERSION
-# define VERSION "cvs"
+# define VERSION "git"
+#endif
+#ifndef VCSID
+# define VCSID "<unknown>"
#endif
/* ELF love */
diff --git a/paxmacho.c b/paxmacho.c
index bd9fcf3..985507d 100644
--- a/paxmacho.c
+++ b/paxmacho.c
@@ -1,7 +1,6 @@
/*
* Copyright 2003-2012 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxmacho.c,v 1.21 2013/04/16 16:26:28 vapier Exp $
*
* Copyright 2005-2012 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2012 Mike Frysinger - <vapier@gentoo.org>
diff --git a/paxmacho.h b/paxmacho.h
index c142da3..41ab43a 100644
--- a/paxmacho.h
+++ b/paxmacho.h
@@ -1,7 +1,6 @@
/*
* Copyright 2005-2012 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxmacho.h,v 1.8 2013/04/16 16:26:28 vapier Exp $
*
* Copyright 2005-2012 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2012 Mike Frysinger - <vapier@gentoo.org>
diff --git a/porting.h b/porting.h
index fcf5ced..32d4171 100644
--- a/porting.h
+++ b/porting.h
@@ -1,7 +1,6 @@
/*
* Copyright 2005-2012 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/porting.h,v 1.46 2014/10/19 08:20:55 vapier Exp $
*
* Copyright 2005-2012 Ned Ludd - <solar@gentoo.org>
* Copyright 2005-2012 Mike Frysinger - <vapier@gentoo.org>
diff --git a/pspax.c b/pspax.c
index c98d44f..e27b7eb 100644
--- a/pspax.c
+++ b/pspax.c
@@ -12,7 +12,6 @@
* cc -o pspax pspax.c -DWANT_SYSCAP -lcap
*/
-static const char rcsid[] = "$Id: pspax.c,v 1.53 2015/02/22 00:54:34 vapier Exp $";
const char argv0[] = "pspax";
#include "paxinc.h"
@@ -483,9 +482,9 @@ static void parseargs(int argc, char *argv[])
switch (flag) {
case 'V': /* version info */
- printf("pax-utils-%s: %s\n%s\n"
+ printf("pax-utils-%s: %s\n"
"%s written for Gentoo by <solar and vapier @ gentoo.org>\n",
- VERSION, __FILE__, rcsid, argv0);
+ VERSION, VCSID, argv0);
exit(EXIT_SUCCESS);
break;
case 'h': usage(EXIT_SUCCESS); break;
diff --git a/scanelf.c b/scanelf.c
index fae8640..4db4c35 100644
--- a/scanelf.c
+++ b/scanelf.c
@@ -1,13 +1,11 @@
/*
* Copyright 2003-2012 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanelf.c,v 1.277 2015/02/28 22:59:34 vapier Exp $
*
* Copyright 2003-2012 Ned Ludd - <solar@gentoo.org>
* Copyright 2004-2012 Mike Frysinger - <vapier@gentoo.org>
*/
-static const char rcsid[] = "$Id: scanelf.c,v 1.277 2015/02/28 22:59:34 vapier Exp $";
const char argv0[] = "scanelf";
#include "paxinc.h"
@@ -2218,9 +2216,9 @@ static int parseargs(int argc, char *argv[])
switch (i) {
case 'V':
- printf("pax-utils-%s: %s\n%s\n"
+ printf("pax-utils-%s: %s\n"
"%s written for Gentoo by <solar and vapier @ gentoo.org>\n",
- VERSION, __FILE__, rcsid, argv0);
+ VERSION, VCSID, argv0);
exit(EXIT_SUCCESS);
break;
case 'h': usage(EXIT_SUCCESS); break;
diff --git a/scanmacho.c b/scanmacho.c
index 71e971c..a36aed4 100644
--- a/scanmacho.c
+++ b/scanmacho.c
@@ -1,7 +1,6 @@
/*
* Copyright 2008-2012 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/scanmacho.c,v 1.25 2015/02/22 00:54:34 vapier Exp $
*
* based on scanelf by:
* Copyright 2003-2012 Ned Ludd - <solar@gentoo.org>
@@ -10,7 +9,6 @@
* 2008-2013 Fabian Groffen - <grobian@gentoo.org>
*/
-static const char rcsid[] = "$Id: scanmacho.c,v 1.25 2015/02/22 00:54:34 vapier Exp $";
const char argv0[] = "scanmacho";
#include "paxinc.h"
@@ -630,9 +628,9 @@ static int parseargs(int argc, char *argv[])
switch (i) {
case 'V':
- printf("pax-utils-%s: %s\n%s\n"
+ printf("pax-utils-%s: %s\n"
"%s written for Gentoo by <solar, vapier and grobian @ gentoo.org>\n",
- VERSION, __FILE__, rcsid, argv0);
+ VERSION, VCSID, argv0);
exit(EXIT_SUCCESS);
break;
case 'h': usage(EXIT_SUCCESS); break;
diff --git a/tests/source/dotest b/tests/source/dotest
index b7b3567..16297e2 100755
--- a/tests/source/dotest
+++ b/tests/source/dotest
@@ -4,7 +4,7 @@
findfiles() {
find "${top_srcdir}" \
- '(' -type d -a '(' -name CVS -o -name .git -o -name autotools ')' -prune ')' \
+ '(' -type d -a '(' -name .git -o -name autotools ')' -prune ')' \
-o '(' '(' -name '*.[ch]' -a ! -name 'config.h' ')' -print0 ')'
}
@@ -12,7 +12,7 @@ findfiles() {
# check for misc common typos
#
find "${top_srcdir}" \
- '(' -type d -a '(' -name CVS -o -name .git -o -name tests ')' -prune ')' \
+ '(' -type d -a '(' -name .git -o -name tests ')' -prune ')' \
-o '(' -type f -a -print0 ')' | xargs -0 \
grep -n -I \
-e '\<compatability\>' \
diff --git a/xfuncs.c b/xfuncs.c
index 5389e17..cd73dfa 100644
--- a/xfuncs.c
+++ b/xfuncs.c
@@ -1,7 +1,6 @@
/*
* Copyright 2003-2012 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/xfuncs.c,v 1.12 2014/03/20 07:52:07 vapier Exp $
*
* Copyright 2003-2012 Ned Ludd - <solar@gentoo.org>
* Copyright 2004-2012 Mike Frysinger - <vapier@gentoo.org>
diff --git a/xfuncs.h b/xfuncs.h
index 959d10d..82f5da0 100644
--- a/xfuncs.h
+++ b/xfuncs.h
@@ -1,7 +1,6 @@
/*
* Copyright 2003-2012 Gentoo Foundation
* Distributed under the terms of the GNU General Public License v2
- * $Header: /var/cvsroot/gentoo-projects/pax-utils/xfuncs.h,v 1.8 2014/03/20 07:59:27 vapier Exp $
*
* Copyright 2003-2012 Ned Ludd - <solar@gentoo.org>
* Copyright 2004-2012 Mike Frysinger - <vapier@gentoo.org>