LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 02-29-2024, 10:04 AM   #1
viel
Member
 
Registered: Jul 2021
Location: Arcadia
Distribution: Slackware
Posts: 46

Rep: Reputation: Disabled
Reproducible builds. Chroot environment, date and config.


Hi all,

Looking for reproducible builds in the Slackware Sub-Forum I only found 3 threads.
One in 2015 other in 2016 and on 2021. But nothing relevant for mi question.

Maybe I'm little daring. Maybe I have to much free time. Maybe I hope Slackware can do it.

I am now playing with chroot to try made an environment for reproducible builds. From my understand to do a reproducible build there are 2 requirements, same date "SOURCE_DATE_EPOCH" and same environment.

I am not an expert on C, compiler, environments, ... So sorry if I'm very wrong.

From now i am trying to change the date on chroot to fix the SOURCE_DATE_EPOCH. I looking deeper to change the system date.

Code:
[root@arcadia sis]# unshare -T -- chroot /tmp/HugeSlackBuildchroot/ /bin/bash  --norc
bash-5.1# echo "boottime $((9*24*60*60)) 0" > /proc/$$/timens_offsets
bash-5.1# echo "monotonic $((2*24*60*60)) 0" > /proc/$$/timens_offsets
bash-5.1# uptime --pretty
up 4 weeks, 22 hours, 18 minutes
bash-5.1#
bash-5.1#
bash-5.1#
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
[root@arcadia v]# uptime --pretty
up 2 weeks, 5 days, 22 hours, 19 minutes
[root@arcadia v]#
Can i have different date for chroot and system?

I installed desired packages on the chroot to build a random package and checksum it. Actually I use the random ncdu to test. I need the same packages installed on the environment rigth? That are trivial to install desired packages on a chroot. Done.

I appreciate if someone can point me in the right way.

I think containers are not the way, too heavy.

I am on a rabbit hole?

Can chroot do same as a container from the point of view of making a reproducible build? Construct same environment, date, etc...

How many thinks are needed on the environment to make a reproducible build?

From env:

Code:
[root@arcadia tmp]# env
SHELL=/bin/bash
WINDOWID=1258293
XDG_CONFIG_DIRS=/etc/xdg:/etc/kde/xdg
TERM_PROGRAM_VERSION=3.2a
TMUX=/tmp/tmux-0/default,4977,0
PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/share/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig
GNOME_KEYRING_CONTROL=/home/xxx/.cache/keyring-3I7NI2
G_BROKEN_FILENAMES=1
HOSTNAME=arcadia.local
MINICOM=-c on
JAVA_HOME=/usr/lib64/zulu-openjdk8
SSH_AUTH_SOCK=/root/.ssh/ssh_auth_sock
ANT_HOME=/usr/share/ant
XDG_SEAT=seat0
PWD=/tmp
LOGNAME=root
XDG_SESSION_TYPE=tty
MANPATH=:/usr/lib64/zulu-openjdk11/man:/usr/lib64/zulu-openjdk8/man
UNO_PATH=/usr/lib64/libreoffice/program
XAUTHORITY=/root/.xauthasdG7U
LS_OPTIONS=-F -b -T 0 --color=auto
WINDOWPATH=1
HOME=/root
LANG=en_US.UTF-8
--squipped--
I need all the environment variables are the same? Can this be configured, automated, changed?

I am looking deeper on internet but some help are welcome.

I do not believe that I lost time if I do not get to a good end, at least I always learn something.

I wrote some garbage scripts in Github from which I am doing the tests. https://github.com/VielLosero/HugeSlackBuilds

All welcome.

Thanks in advance.

Edited: Maybe no the right forum

Viel.

Last edited by viel; 02-29-2024 at 10:13 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Live Patching Requires Reproducible Builds – and Containers Are the Answer LXer Syndicated Linux News 1 02-29-2024 07:58 AM
LXer: Linux Foundation Back Reproducible Builds Effort for Secure Software LXer Syndicated Linux News 0 11-14-2016 09:29 PM
Reproducible builds Rinndalir Slackware 9 08-26-2016 06:11 PM
Does Slackware/Slackbuilds support reproducible builds? Altiris Slackware 14 09-15-2015 03:12 AM
Slackbuild of Scilab 5.1 fails under Slackware64 13... is this reproducible...?? Alexvader Slackware 21 11-29-2009 02:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 08:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration