diff --git a/.chrpath.metadata b/.chrpath.metadata new file mode 100644 index 0000000..0fc91c1 --- /dev/null +++ b/.chrpath.metadata @@ -0,0 +1 @@ +11ff3e3dda2acaf1e529475f394f74f2ef7a8204 SOURCES/chrpath-0.13.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/chrpath-0.13-NULL-entry.patch b/SOURCES/chrpath-0.13-NULL-entry.patch new file mode 100644 index 0000000..27275d2 --- /dev/null +++ b/SOURCES/chrpath-0.13-NULL-entry.patch @@ -0,0 +1,16 @@ +diff -uNr chrpath-0.13.old/killrpath.c chrpath-0.13/killrpath.c +--- chrpath-0.13.old/killrpath.c 2003-06-24 00:46:15.000000000 +0200 ++++ chrpath-0.13/killrpath.c 2009-07-19 23:05:11.000000000 +0200 +@@ -73,8 +73,11 @@ + if ( ! elf_dynpath_tag(dyns[i].d_tag) ) + dynpos++; + } +- for (; dynpos < i; dynpos++) ++ for (; dynpos < i; dynpos++) { + dyns[dynpos].d_tag = DT_NULL; ++ dyns[dynpos].d_un.d_val = 0x0; ++ } ++ + + if (lseek(fd, phdr.p_offset, SEEK_SET) == -1 + || write(fd, dyns, phdr.p_filesz) != (int)phdr.p_filesz) diff --git a/SOURCES/chrpath-0.13-aarch64.patch b/SOURCES/chrpath-0.13-aarch64.patch new file mode 100644 index 0000000..23d9e25 --- /dev/null +++ b/SOURCES/chrpath-0.13-aarch64.patch @@ -0,0 +1,32 @@ +diff -urN chrpath-0.13/config.guess chrpath-0.13-aarch64/config.guess +--- chrpath-0.13/config.guess 2002-04-01 06:18:37.000000000 -0600 ++++ chrpath-0.13-aarch64/config.guess 2013-03-07 21:01:24.604531606 -0600 +@@ -637,6 +705,9 @@ + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; ++ aarch64:Linux:*:*) ++ echo ${UNAME_MACHINE}-unknown-linux-gnu ++ exit ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; +diff -urN chrpath-0.13/config.sub chrpath-0.13-aarch64/config.sub +--- chrpath-0.13/config.sub 2002-04-01 06:18:37.000000000 -0600 ++++ chrpath-0.13-aarch64/config.sub 2013-03-07 21:01:24.647526709 -0600 +@@ -226,6 +255,7 @@ + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ ++ | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ +@@ -278,6 +367,7 @@ + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ ++ | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ diff --git a/SOURCES/chrpath-0.13-getopt_long.patch b/SOURCES/chrpath-0.13-getopt_long.patch new file mode 100644 index 0000000..2e706f2 --- /dev/null +++ b/SOURCES/chrpath-0.13-getopt_long.patch @@ -0,0 +1,13 @@ +diff -up ./main.c~ ./main.c +--- ./main.c~ 2004-09-19 10:33:37.000000000 +0200 ++++ ./main.c 2012-10-22 12:10:03.795745769 +0200 +@@ -31,7 +31,8 @@ static struct option long_options[] = + {"keepgoing", 0, 0, 'k'}, + {"list", 0, 0, 'l'}, + {"replace", 1, 0, 'r'}, +- {"version", 0, 0, 'v'} ++ {"version", 0, 0, 'v'}, ++ {0, 0, 0, 0} + }; + + #else /* not HAVE_GETOPT_LONG */ diff --git a/SOURCES/chrpath-0.13-help.patch b/SOURCES/chrpath-0.13-help.patch new file mode 100644 index 0000000..e257217 --- /dev/null +++ b/SOURCES/chrpath-0.13-help.patch @@ -0,0 +1,13 @@ +diff -up chrpath-0.13/main.c\~ chrpath-0.13/main.c +--- chrpath-0.13/main.c~ 2013-04-04 18:01:29.519912735 +0200 ++++ chrpath-0.13/main.c 2013-04-08 10:34:19.332766127 +0200 +@@ -52,6 +52,7 @@ usage(char *progname) + printf(" -r |--replace Replace current rpath/runpath setting\n"); + printf(" with the path given\n"); + printf(" -l|--list List the current rpath/runpath (default)\n"); ++ printf(" -k|--keepgoing Do not fail on first error\n"); + printf(" -h|--help Show this usage information.\n"); + #ifndef HAVE_GETOPT_LONG + printf("\n *** The long options are not available on this platform"); + +Diff finished. Mon Apr 8 10:34:27 2013 diff --git a/SPECS/chrpath.spec b/SPECS/chrpath.spec new file mode 100644 index 0000000..dac81e1 --- /dev/null +++ b/SPECS/chrpath.spec @@ -0,0 +1,87 @@ +Summary: Modify rpath of compiled programs +Name: chrpath +Version: 0.13 +Release: 12%{?dist} +License: GPL+ +Group: Development/Tools +URL: ftp://ftp.hungry.com/pub/hungry/chrpath/ +Source0: ftp://ftp.hungry.com/pub/hungry/chrpath/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +Patch0: chrpath-0.13-NULL-entry.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=868611 +Patch1: chrpath-0.13-getopt_long.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=925224 +Patch2: chrpath-0.13-aarch64.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=948858 +Patch3: chrpath-0.13-help.patch + +%description +chrpath allows you to modify the dynamic library load path (rpath) of +compiled programs. Currently, only removing and modifying the rpath +is supported. + +%prep +%setup -q +%patch0 -p1 -b .NULL +%patch1 -p1 -b .getopt_long +%patch2 -p1 -b .aarch64 +%patch3 -p1 -b .help + +%build +%configure +make + +%install +rm -rf %{buildroot} +make install DESTDIR=%{buildroot} +rm -fr %{buildroot}/usr/doc + +%clean +rm -rf %{buildroot} + + +%files +%defattr(-,root,root,-) +%doc AUTHORS COPYING README NEWS ChangeLog* +%{_bindir}/chrpath +%{_mandir}/man1/chrpath.1* + +%changelog +* Mon Apr 8 2013 Petr Machata - 0.13-12 +- Add missing help for -k|--keepgoing option + (chrpath-0.13-help.patch) + +* Thu Apr 4 2013 Petr Machata - 0.13-11 +- Add missing last entry in long options array + (chrpath-0.13-getopt_long.patch) +- Update config.sub and config.guess to support aarch64 + (chrpath-0.13-aarch64.patch) + +* Wed Feb 13 2013 Fedora Release Engineering - 0.13-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Wed Jul 18 2012 Fedora Release Engineering - 0.13-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Jan 12 2012 Fedora Release Engineering - 0.13-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Feb 08 2011 Fedora Release Engineering - 0.13-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Jul 24 2009 Fedora Release Engineering - 0.13-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Jul 23 2009 Axel Thimm - 0.13-5 +- Fix last entry in .dynamic (by Christian Krause ). + +* Sat Sep 8 2007 Ville Skyttä - 0.13-2 +- License: GPL+ + +* Sun Mar 12 2006 Axel Thimm - 0.13-1 +- Initial build. +