Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
devel:tools
reproducible-faketools
reproducible-faketools-0.4.0.obscpio
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File reproducible-faketools-0.4.0.obscpio of Package reproducible-faketools
07070100000000000081A400000000000000000000000161F3B43400000462000000000000000000000000000000000000002800000000reproducible-faketools-0.4.0/LICENSE.mdFiles in this project are licensed under MIT License Copyright (c) 2016-2017 SUSE LLC and others Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 07070100000001000081A400000000000000000000000161F3B4340000019E000000000000000000000000000000000000002600000000reproducible-faketools-0.4.0/MakefilePREFIX:=/usr/local install: install -d $(DESTDIR)$(PREFIX)/bin/ $(DESTDIR)$(PREFIX)/lib/ $(DESTDIR)/etc/profile.d/ $(DESTDIR)/etc/sysctl.d/ install -p -m 755 bin/* $(DESTDIR)$(PREFIX)/bin/ install -p -m 644 lib/reproducible-faketools-lib $(DESTDIR)$(PREFIX)/lib/ install -p -m 644 extra/disorderfs.sh $(DESTDIR)/etc/profile.d/ echo kernel.randomize_va_space = 0 > $(DESTDIR)/etc/sysctl.d/01-disable-aslr.conf 07070100000002000081A400000000000000000000000161F3B43400000201000000000000000000000000000000000000002700000000reproducible-faketools-0.4.0/README.md# reproducible-faketools These tools are meant to help with [reproducible builds](https://reproducible-builds.org/). This works by masking standard UNIX tools in build environments with versions that give more predictable output when [$SOURCE_DATE_EPOCH](https://reproducible-builds.org/specs/source-date-epoch/) is set but just redirect to the normal version otherwise. This is similar to [reproducible-utils](https://anonscm.debian.org/git/reproducible/reproducible-utils.git/tree/) and might be merged later. 07070100000003000081A400000000000000000000000161F3B43400000268000000000000000000000000000000000000002600000000reproducible-faketools-0.4.0/_service<services> <service mode="disabled" name="obs_scm"> <param name="url">https://github.com/bmwiedemann/reproducible-faketools.git</param> <param name="scm">git</param> <param name="revision">devel</param> <param name="version">0.4.1</param> <param name="extract">reproducible-faketools.spec</param> <param name="extract">_service</param> </service> <service mode="disabled" name="set_version" /> <service mode="buildtime" name="tar" /> <service mode="buildtime" name="recompress"> <param name="file">*.tar</param> <param name="compression">xz</param> </service> </services> 07070100000004000041ED00000000000000000000000261F3B43400000000000000000000000000000000000000000000002100000000reproducible-faketools-0.4.0/bin07070100000005000081ED00000000000000000000000161F3B434000000F4000000000000000000000000000000000000002500000000reproducible-faketools-0.4.0/bin/ant#!/bin/sh . $(dirname $0)/../lib/reproducible-faketools-lib ANT_ARGS+=" -Dant.tstamp.now=$SOURCE_DATE_EPOCH" export ANT_ARGS $orig "$@" if [ -e /usr/bin/strip-nondeterminism ] ; then faketoolnotice "$@" strip-all-nondeterminism || : fi 07070100000006000081ED00000000000000000000000161F3B43400000087000000000000000000000000000000000000002400000000reproducible-faketools-0.4.0/bin/ar#!/bin/sh . $(dirname $0)/../lib/reproducible-faketools-lib [ "$1" != "-r" ] && exec $orig "$@" faketoolnotice "$@" exec $orig -D "$@" 07070100000007000081ED00000000000000000000000161F3B43400000197000000000000000000000000000000000000002600000000reproducible-faketools-0.4.0/bin/date#!/bin/bash . $(dirname $0)/../lib/reproducible-faketools-lib for arg in "$@" ; do if [[ $arg =~ ^-d ]] ||\ [[ $arg =~ ^--date ]] ||\ [[ $arg =~ ^-f ]] ||\ [[ $arg =~ ^-uf ]] ||\ [[ $arg =~ ^--file ]] ||\ [[ $arg =~ ^-r ]] ||\ [[ $arg =~ ^-ur ]] ||\ [[ $arg =~ ^--reference ]] then exec $orig "$@" fi done faketoolnotice "$@" exec $orig --utc -d "@${SOURCE_DATE_EPOCH}" "$@" 07070100000008000081ED00000000000000000000000161F3B434000000C7000000000000000000000000000000000000002600000000reproducible-faketools-0.4.0/bin/find#!/bin/bash . $(dirname $0)/../lib/reproducible-faketools-lib sortparm= for arg in "$@" ; do [[ "$arg" = "-print0" ]] && sortparm=-z done faketoolnotice "$@" exec $orig "$@" | sort $sortparm 07070100000009000081ED00000000000000000000000161F3B43400000036000000000000000000000000000000000000002600000000reproducible-faketools-0.4.0/bin/gzip#!/bin/sh export PATH=/bin:/usr/bin exec gzip -n "$@" 0707010000000A000081ED00000000000000000000000161F3B43400000098000000000000000000000000000000000000002A00000000reproducible-faketools-0.4.0/bin/hostname#!/bin/sh . $(dirname $0)/../lib/reproducible-faketools-lib [ "$*" != "" ] && [ "$*" != "-f" ] && exec $orig "$@" faketoolnotice "$@" echo reproducible 0707010000000B000081ED00000000000000000000000161F3B4340000042B000000000000000000000000000000000000003500000000reproducible-faketools-0.4.0/bin/reproducible-zip.pl#!/usr/bin/perl -w use strict; use Getopt::Long; Getopt::Long::Configure ("bundling"); my @mappedargv=qw(7z -tzip -mtc=off); my @lateargv=(); my %options=qw(); my @options=qw"recurse-paths|r filesync delete|d update|u test|T move|m exclude|x=s no-extra|X no-dir-entries|D junk-paths|j quiet|q names-stdin|@ 0 1 2 3 4 5 6 7 8 9"; GetOptions(\%options, @options); #print (%options); for(0..9) { if($options{$_}) {push(@mappedargv, "-mx=$_")} } push(@mappedargv, "-bd") if $options{quiet}; push(@mappedargv, "-x".$options{exclude}) if $options{exclude}; if($options{"junk-paths"}) { die "junk-paths option is not supported in $0" } if($options{"names-stdin"}) {push(@lateargv, '@/dev/stdin')} my $action='a'; my %actionmap=qw( add a update u delete d ); if($actionmap{$ARGV[0]}) { $action=$actionmap{shift(@ARGV)}; } if($options{move}) {$action="a"} if($options{update}) {$action="u"} if($options{delete}) {$action="d"} if($options{test}) {$action="t"} push(@mappedargv, $action, @ARGV, @lateargv); print STDERR "@mappedargv\n"; exec(@mappedargv); 0707010000000C000081ED00000000000000000000000161F3B434000000F4000000000000000000000000000000000000003300000000reproducible-faketools-0.4.0/bin/rpmbuild-faketime#!/bin/sh : ${SOURCE_DATE_EPOCH:=1533078061} . $(dirname $0)/../lib/reproducible-faketools-lib factor=0.001 faketoolnotice factor=$factor date=$SOURCE_DATE_EPOCH exec faketime -f "@$(date -u -d@$SOURCE_DATE_EPOCH "+%F %T") i$factor" $orig "$@" 0707010000000D000081ED00000000000000000000000161F3B434000000C3000000000000000000000000000000000000003100000000reproducible-faketools-0.4.0/bin/rpmbuild-strace#!/bin/sh exec strace -q -s 400 -f \ -e open,openat,rename,renameat,renameat2,link,linkat,symlink,symlinkat\ ,chdir,fchdir,execve\ ,clone,clone3,fork,vfork,uname \ /usr/bin/rpmbuild "$@" 0707010000000E000081ED00000000000000000000000161F3B43400000063000000000000000000000000000000000000002700000000reproducible-faketools-0.4.0/bin/strip#!/bin/sh . $(dirname $0)/../lib/reproducible-faketools-lib faketoolnotice "$@" exec $orig -D "$@" 0707010000000F000081ED00000000000000000000000161F3B434000000C3000000000000000000000000000000000000002400000000reproducible-faketools-0.4.0/bin/su#!/bin/sh . $(dirname $0)/../lib/reproducible-faketools-lib if [ "$2" = "/.build.command" ] ; then faketoolnotice "fixed pid" echo 10000 > /proc/sys/kernel/ns_last_pid fi exec $orig "$@" 07070100000010000081ED00000000000000000000000161F3B434000000EC000000000000000000000000000000000000002500000000reproducible-faketools-0.4.0/bin/tar#!/bin/sh . $(dirname $0)/../lib/reproducible-faketools-lib faketoolnotice "$@" rbopts="--sort=name --clamp-mtime --mtime @$SOURCE_DATE_EPOCH" echo "$@" | grep -q -- --pax-option || rbopts="$rbopts --format=gnu" exec $orig "$@" $rbopts 07070100000011000081ED00000000000000000000000161F3B434000002C6000000000000000000000000000000000000002700000000reproducible-faketools-0.4.0/bin/uname#!/bin/sh . $(dirname $0)/../lib/reproducible-faketools-lib [ "$*" = "" ] && exec $orig "$@" [ "$*" = "-a" ] && exec "$0" -s -n -r -v -m -p -i -o add() { [ -z "$o" ] || o="$o " o="$o$1" } o="" for arg in "$@" ; do case "$arg" in -n) faketoolnotice $arg nodename add "reproducible" ;; -v) faketoolnotice $arg kernel version add "reproducible" ;; -r) faketoolnotice $arg kernel release t=`$orig $arg|sed -e 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*/\1-reproducible/'` add "$t" ;; *) add "`$orig $arg`" ;; esac done echo "$o" 07070100000012000081ED00000000000000000000000161F3B4340000006E000000000000000000000000000000000000002500000000reproducible-faketools-0.4.0/bin/zip#!/bin/sh . $(dirname $0)/../lib/reproducible-faketools-lib faketoolnotice "$@" exec reproducible-zip.pl "$@" 07070100000013000041ED00000000000000000000000261F3B43400000000000000000000000000000000000000000000002300000000reproducible-faketools-0.4.0/extra07070100000014000081A400000000000000000000000161F3B434000001AE000000000000000000000000000000000000003100000000reproducible-faketools-0.4.0/extra/disorderfs.sh#!/bin/sh ( exec >/dev/null exec 2>&1 if [ -e /home/abuild/rpmbuild/BUILD ] && ! [ -e /home/abuild/rpmbuild/BUILD.unsorted ] ; then mv /home/abuild/rpmbuild/BUILD /home/abuild/rpmbuild/BUILD.unsorted mkdir /home/abuild/rpmbuild/BUILD # needs chmod 4755 /usr/bin/fusermount # and mknod /dev/fuse c 10 229 disorderfs --sort-dirents=yes --reverse-dirents=no /home/abuild/rpmbuild/BUILD.unsorted /home/abuild/rpmbuild/BUILD fi ) 07070100000015000041ED00000000000000000000000261F3B43400000000000000000000000000000000000000000000002100000000reproducible-faketools-0.4.0/lib07070100000016000081A400000000000000000000000161F3B43400000118000000000000000000000000000000000000003C00000000reproducible-faketools-0.4.0/lib/reproducible-faketools-lib# to be sourced by the scipts in this package orig=/usr/bin/$(basename $0) [ -x "$orig" ] || orig=/bin/$(basename $0) [ -n "$SOURCE_DATE_EPOCH" ] || exec $orig "$@" export LC_ALL=C unset TZ faketoolnotice() { echo "notice: used reproducible-faketool $(basename $0) $@" >&2 } 07070100000017000081A400000000000000000000000161F3B43400001581000000000000000000000000000000000000003900000000reproducible-faketools-0.4.0/reproducible-faketools.spec# # spec file for package reproducible-faketools # # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: reproducible-faketools Version: 0.4.1 Release: 0 Summary: Fake system tools for reproducible builds License: MIT Group: Development/Tools/Other Url: https://github.com/bmwiedemann/reproducible-faketools Source0: %{name}-%{version}.tar.xz Requires: hostname Requires: coreutils BuildArch: noarch %description These tools are meant to help with reproducible builds. This works by masking standard UNIX tools in build environments with versions that give more predictable output when $SOURCE_DATE_EPOCH is set but just redirect to the normal version otherwise. %prep %setup %build echo dummy file because an rpm cannot be empty > README.random %install %makeinstall %package hostname Summary: replacement hostname Requires: reproducible-faketools %description hostname a script to enhance the reproducibility of the output of hostname %files hostname %defattr(-, root, root, 0755) /usr/local/bin/hostname /usr/local/bin/uname %package date Summary: replacement date Requires: reproducible-faketools %description date a script to enhance the reproducibility of the output of date %files date %defattr(-, root, root, 0755) /usr/local/bin/date %package find Summary: replacement find Requires: reproducible-faketools %description find a script to enhance the reproducibility of the output of find %files find %defattr(-, root, root, 0755) /usr/local/bin/find %package ar Summary: replacement ar Requires: reproducible-faketools %description ar a script to enhance the reproducibility of the output of ar %files ar %defattr(-, root, root, 0755) /usr/local/bin/ar /usr/local/bin/strip %package tar Summary: replacement tar Requires: reproducible-faketools Requires: tar >= 1.28 %description tar a script to enhance the reproducibility of the output of tar by adding --sort and --mtime options %files tar %defattr(-, root, root, 0755) /usr/local/bin/gzip /usr/local/bin/tar %package ant Summary: replacement ant Requires: reproducible-faketools Requires: strip-nondeterminism %description ant a script to enhance the reproducibility of the output of ant %files ant %defattr(-, root, root, 0755) /usr/local/bin/ant %package filesys Summary: sorted filesystem Requires: disorderfs %description filesys a script to make sure readdir on filesystems is always sorted during build WARNING: do not use outside OBS or osc build --vm-type=kvm %files filesys %defattr(-, root, root, 0755) /etc/profile.d/disorderfs.sh %post filesys chmod 4755 /usr/bin/fusermount || : mknod /dev/fuse c 10 229 || : %package pid Summary: use fixed pid Requires: reproducible-faketools %description pid a script to wrap su to start a build with a fixed process id to enhance the reproducibility of some packages %files pid %defattr(-, root, root, 0755) /usr/local/bin/su %package aslr Summary: disable address space layout randomization Requires(post): procps %description aslr disable address space layout randomization to test if programs that use memory pointers like edje_cc work more reproducibly under these conditions %files aslr %defattr(-, root, root, 0644) /etc/sysctl.d/01-disable-aslr.conf %post aslr sysctl --system %postun aslr sysctl -w kernel.randomize_va_space=2 %package random Summary: reduce sources of explicit randomness %description random reduce sources of explicit randomness by replacing /dev/random and urandom %files random %doc README.random %post random rm -f /dev/{,u}random mknod /dev/random c 1 5 mknod /dev/urandom c 1 5 %postun random rm -f /dev/{,u}random mknod /dev/random c 1 8 mknod /dev/urandom c 1 9 %package zip Summary: replacement zip Requires: p7zip Requires: perl Requires: reproducible-faketools %description zip a script to enhance the reproducibility of the output of zip by replacing it with a wrapper to 7z %files zip %defattr(-, root, root, 0755) /usr/local/bin/zip /usr/local/bin/reproducible-zip.pl %package faketime Summary: fake time via LD_PRELOAD RemovePathPostfixes: -faketime Requires: libfaketime Requires: reproducible-faketools %description faketime a script to enhance the reproducibility of the output by replacing time(2) and fstat(2) library calls to return our notion of time %files faketime %defattr(-, root, root, 0755) /usr/local/bin/rpmbuild-faketime %package strace Summary: run build with strace RemovePathPostfixes: -strace Requires: strace Conflicts: reproducible-faketools-faketime %description strace a script to facilitate the debugging of reproducibility issues by running rpmbuild with strace to find how files are created %files strace %defattr(-, root, root, 0755) /usr/local/bin/rpmbuild-strace %files %defattr(-, root, root, 0755) %license LICENSE.md %doc README.md /usr/local/lib/%{name}* %changelog 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!33 blocks
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor