肺纤维化是什么症状| 锅包肉是什么肉| 女生为什么会叫| 来大姨妈能喝什么饮料| 想要什么样的爱| 慢性阑尾炎挂什么科| 补气血吃什么食物最好| 哪吒妈妈叫什么名字| 咳嗽吃什么好得快| 湿气重不能吃什么食物| 睡觉咬舌头是什么原因| 痛风不能吃什么东西| 饭后放屁多是什么原因| 手指甲没有月牙是什么原因| 能量棒是什么东西| 癸水的根是什么| 男人鼻子大代表什么| 眼皮肿痛什么原因| 得了肠息肉有什么症状| 目不暇接的意思是什么| 喝什么去火| 蝙蝠吃什么食物| 肾积液是什么原因造成的| 女人体检都查什么项目| 黄牌车是什么意思| 2023年五行属什么| 五险都有什么| 拜读是什么意思| 肋骨外翻是什么原因| 砂锅是什么材料做的| 12年属什么生肖| 硬着头皮是什么意思| 月黑见渔灯的见读什么| 流鼻血挂什么科| 太平猴魁是什么茶| 心季吃什么药| 老白茶属于什么茶| 宜什么意思| 86年属什么的| 腰痛应该挂什么科| pashmina是什么面料| 肝郁有什么症状| 桃园三结义是什么生肖| 气的什么| 什么歌最好听| 枣红色配什么颜色好看| 梦见芝麻是什么意思| 大油边是什么| 化工厂是干什么的| 三七粉什么时间喝好| 孕妇用什么驱蚊最安全| 苏武牧羊是什么意思| 介错是什么意思| 孩子脾虚内热大便干吃什么药| 小哥哥是什么意思| 扁桃体发炎引起的发烧吃什么药| 起湿疹是什么原因造成的| 总是低烧是什么原因造成的| 什么是静脉| 器质性病变是什么意思| 什么是微量元素| 膀胱炎是什么症状表现| 正军级是什么级别| 蜂蜜的波美度是什么意思| 天经地义是什么意思| 骨质增生是什么意思| 兔子肉不能和什么一起吃| 肾虚有什么症状| 今天是什么节日吗| 女孩小名叫什么好| 男性湿热吃什么药最好| 宫颈糜烂用什么药比较好| 金玉良缘什么意思| 65年属什么生肖| 摆脱是什么意思| 生命的尽头是什么| 肝功能检查什么| 总胆红素偏高是什么引起的| 韭菜什么人不能吃| 手术后喝什么汤恢复快| 血糖是什么引起的| 长沙有什么玩的| 什么是佛| 一只脚心疼是什么原因| PT医学上是什么意思| 青团是什么节日吃的| 难道是什么意思| 为什么阴天紫外线更强| 连襟什么意思| 米粉和米线有什么区别| 手脱臼有什么症状| 女儿红是什么酒| 辣眼睛是什么意思| 维纳斯是什么意思| 回族为什么不吃猪肉| 手术后吃什么营养品好| 豹纹守宫吃什么| 吃什么帮助消化| wis是什么牌子| 念珠菌阳性是什么病| 营销号是什么| 晕3d是什么原因| 肚子两侧疼是什么原因| 什么是肺部磨玻璃结节| 红斑狼疮是一种什么病| 打饱嗝是什么原因| 治骨质疏松打什么针| 为什么肚子总是胀胀的| 打了封闭针后要注意什么事项| 胰腺做什么检查| 口咸是什么原因引起的| 胆囊炎能吃什么水果| 独角仙生活在什么地方| 挪揄是什么意思| 眼睛模糊什么原因| 市政协秘书长是什么级别| 维生素d是什么| 鱼疗是什么鱼| 红眼病有什么症状| 什么叫前列腺炎| 10.5是什么星座| 什么鸡| mk包包属于什么档次| 妊娠高血压对胎儿有什么影响| 曹操的脸谱是什么颜色| mg是什么单位| 女生右手食指戴戒指什么意思| 直升是什么意思| 菠萝是什么意思| 产后可以吃什么水果| 疤痕增生是什么原因| 系带割掉了有什么影响| 翌字五行属什么| 窦是什么意思| 鹅喜欢吃什么草| 什么是g大调| 中性粒细胞百分比偏低是什么意思| resp是什么| 什么两难| 甲抗是什么原因引起的| 放风筝是什么季节| 龟苓膏是什么做的| 减肥吃什么菜最好| 隔桌不买单是什么意思| 7.1是什么日子| 2013属什么生肖| 吃什么可以排出霉菌| 性格开朗是什么意思| 非农业户口是什么意思| 情劫什么意思| 异想天开什么意思| 睡觉腿抽筋是什么原因| 11.6号是什么星座| 铁皮石斛花有什么作用| 续航是什么意思| 头发掉要用什么洗发水| 血管性头痛吃什么药| 土命缺什么| iu是什么意思| 前白蛋白偏低是什么意思| 治疗舌苔白厚用什么药| 行政许可是什么意思| 乳房结节吃什么药| 什么是直肠炎| 右上眼皮跳是什么预兆| 大便变细是什么原因| 难免流产什么意思| 总胆红素偏高说明什么| 吃李子有什么好处和坏处| 宫颈cin1级是什么意思| 什么叫闭合性跌打损伤| 红颜薄命的意思是什么| e代表什么数字| 蚯蚓可以钓什么鱼| 铅中毒有什么症状| 草字头加全念什么| 澄面粉是什么面粉| 什么是情商高| 10年是什么婚| 海为什么是蓝色| 黄鳝不能和什么一起吃| 甲功三项是什么| 三宫六院是什么意思| 女性尿液发黄是什么原因| 什么是爱情| 尿道口红肿用什么药| 肌肤之钥是什么档次| 检验葡萄糖用什么试剂| 耳朵上有痣代表什么| 舌头烂了是什么原因| igg抗体是什么意思| 清道夫吃什么| 韭菜不能和什么一起吃| 红色的月亮是什么征兆| 吃什么可以让阴茎变硬| 说一个人轴是什么意思| 艾灸有什么好处| 排尿困难吃什么药| 捞女是什么意思| 4.19是什么星座| 三峡大坝什么时候建成的| 做造影什么时候做最好| snidel是什么牌子| 摩羯座的幸运色是什么| 什么是网球肘| 女人吃芡实有什么好处| 沅字的寓意是什么| 湿气重的人吃什么好| 诸什么意思| 心慌气短是什么原因| 属龙五行属什么| 什么食粮| 缺铁吃什么补得最快| 过敏吃什么药最有效| 专科女生学什么专业好| 吃什么能润肠通便| 贝母是什么| 小脑梗塞会出现什么症状| 锦鲤什么意思| 碱性磷酸酶是什么意思| 白喉是什么病| 为什么突然就得肝炎了| 母字是什么结构| 胆固醇高是什么引起的| 石女什么样| 甲抗是什么原因引起的| 鼻子老是出血是什么原因| 什么是混合磨玻璃结节| 下午六点是什么时辰| 随大流什么意思| 手为什么会抖| 男人梦见老鼠什么征兆| 伏特加兑什么饮料好喝| 眉毛尾部有痣代表什么| 多囊是什么病| 瑞士移民需要什么条件| 吃三七粉有什么功效| 1月16日什么星座| 淋巴癌有什么症状| 压到蛇了是有什么预兆| 清朝什么时候灭亡的| 甲状腺穿刺是什么意思| 来例假吃什么食物好| 尼莫地平片治什么病| 荔枝为什么上火| cho是什么意思| 咳嗽吃什么药最好| 81年属什么生肖| 马拉色菌是什么| 生吃大蒜有什么好处| pc是什么塑料| 色弱是什么意思| 李子为什么不能多吃| 肝实质回声欠均匀是什么意思| 风寒感冒吃什么消炎药| 阴囊潮湿吃什么食物| 手指缝里长水泡还痒是什么原因| 外传是什么意思| 主胰管不扩张是什么意思| 天蝎座跟什么星座最配| 子宫内膜14mm说明什么| 老虎头是什么牌子衣服| 军长相当于地方什么官| 脚气挂什么科室| 百度
百度 文章观点仅代表个人,不代表凤凰汽车媒体立场。

Got a spare moment? Please migrate this to our new webpages

Introduction

A source package should build byte-for-byte identical products when rebuilt in the same environment. The environment is defined as:

We have seen variations related to the time of the build, the order of files on the filesystem, the current user, the system hostname, the uname output, (pseudo-)-randomness, and the CPU features or load. Such aspects must not be captured by the build process to make a package reproducible.

Testing procedure

Newer method

  1. Set up a schroot as described in sbuild#Create_the_chroot

  2. Avoid sudo password prompts. (For more information see Notes on variations and Avoid sudo(1) password prompts in reprotest README)

    • $ reprotest --print-sudoers \
          --variations=user_group.available+=guest-builder,domain_host.use_sudo=1 \
          | sudo EDITOR=tee visudo -f /etc/sudoers.d/local-reprotest
      $ echo "/etc/sudoers.d/local-reprotest /etc/sudoers.d/local-reprotest none bind 0 0" \
          | sudo tee -a /srv/chroot/unstable-amd64-sbuild/etc/fstab
  3. Check package reproducibility
    • $ sudo reprotest --vary=-build_path,domain_host.use_sudo=1 --auto-build XXX.dsc -- schroot unstable-amd64-sbuild

      (or path/to/unpacked/pkgdir instead of XXX.dsc)

    • Note: for the time being this omits certain variations compared to our test infrastructure, but we're working on it. Specifically, these are: domain/host, bash-vs-dash, num_cpus, linux-namespace. If you need to test these, then either wait or use the "older method" below.
  4. If your package is unreproducible (after 2 builds), --auto-build will run further builds with different variations to try to identify which ones are causing the non-determinism.

Older method, deprecated

The easiest way to get a test environment for now is to use pbuilder. Setup a build chroot with the experimental toolchain. (We use the plain Debian toolchain nowadays, since 2016 probably.)

Then clone the reproducible-misc.git repository.)--

Hacking packages then looks like:

  1. apt-get source foo

  2. cd foo*

  3. dch -v "$(dpkg-parsechangelog -S Version).0~reproducible1"

  4. Fix reproducibility issues.
  5. dpkg-buildpackage -S

  6. cd ../../misc/prebuilder

  7. dcmd cp ../foo*reproducible1*.dsc .

  8. ./rebuild.sh foo

Look for a fat big “reproducible” banner if test is successful. Otherwise, look for logs and diffoscope output in the logs directory.

First steps to make a package reproducible

Currently a plain sid environment is not enough to build packages reproducibly. An experimental toolchain is available while changes are waiting to be integrated in the main archive.

The first steps needed to make a package build reproducibly depends on the packaging style. With this, the basics should be covered and simple packages should build reproducible. See the next chapter for a discussion of common reproducibility issues and their solutions.

dh

No changes required.

cdbs

No changes required.

Explicit calls to dh_*

Please consider migrating the package to dh.

If the packages is not reproducible, start by adding dh_strip_nondeterminism before dh_compress.

Do It Yourself

Please consider migrating the package to dh.

Usual fixes are:

Identified problems, and possible solutions

Once applied the basic recommendations, a package might still not build reproducibly.

diffoscope has been written to help one understanding the sources of unreproducibility. It compares two files and output their differences, recursively unpacking archives or using transformation tool to generates meaningful diffs. In the Debian context, it's usually called on the .changes files of two different builds.

What follows is a list of common issues and known solutions. For reference, we keep documentation on old issues that should not happen with the current experimental toolchain.

Files in data.tar depends on filesystem order

The build system needs to be patched to sort directory listings.

Example patch

Specific issues:

Files in data.tar vary with the locale

The build system should be patched to add LC_ALL=C.UTF-8 to the environment.

Files in data.tar vary with the timezone

The timezone used while building can also have an effect on reproducibility.

Specific issues:

Files in data.tar contains hostname, uname output, username

Remove places where the information is recorded. If that's not possible, use dummy values. Example

Specific issues:

Files in data.tar contain timestamps

Recommended solutions in order of preference:

Specific issues:

Fixed in Debian, needs to be upstreamed:

Files in data.tar depends on (pseudo-)randomness

Permissions in data.tar depends on umask

The permissions of files shipped by Debian packages should not change with the value of the file creation mask (umask).

Example diffoscope

Easy solution: use dh or dh_fixperms. Otherwise, care to fix the permissions manually.

POSIX says that the file mode on symlinks is undefined, so this ends up being system dependent behavior. On Linux the umask is ignored when creating symlinks, but on other systems such as kFreeBSD or Hurd the umask is honored, which can produce varying file modes. This is at least a problem for architecture independent packages which are built on different operating systems.

A way to always get the same file mode for symlinks is to set umask to 0 before creating them, and restore the previous umask afterwards, but this might be unfeasible in general.

Members of control.tar and data.tar have varying mtimes

dpkg-deb will record the mtime of files it packs in control.tar and data.tar. Files generated during the build process will get a different mtime with each build. Best solution is to change their mtime to the date of the latest debian/changelog entry.

debhelper will take care of adjusting mtimes (759886).

Example patch for custom packaging style. Known affected packages.

Installed-Size differs

Installed-Size can be different depending See 650077.

Guillem Jover wrote a patch for dpkg solving the issue.

RPATH tags differ

RPATH is an optional tag in an ELF file to indicate additional paths for the linker to use. If an absolute path is used, the build will be non-reproducible. (The tags live in the .dynstr section of the ELF file; the section contents can be dumped with objdump -j .dynstr -s ELFFILE). The chrpath utility can be used to strip out the RPATH tags. This works, but the tag text remains in the ELF file, so the build remains non-reproducible. Editing ELF files after they have been created is difficult, so it is recommended to either

Lintian tags

Some Lintian tags can help identify issues that could prevent a package from being reproducible:

6.20什么星座 间歇性跛行见于什么病 阴阳两虚吃什么食物 prog是什么意思 邪气是什么意思
西安有什么玩的 什么牌子的学习机好 眼睛飞蚊症用什么药能治好 印度什么人种 睡不着什么原因
单数是什么 乙肝两对半定量是什么意思 不知道干什么 仁字五行属什么 彪子是什么意思
脸部填充用什么填充最好 我们在干什么 1981年五行属什么 38属什么 肝左叶囊性灶什么意思
柯基犬为什么要断尾巴hcv9jop5ns0r.cn 吃什么东西可以补血hcv8jop7ns7r.cn xxoo什么意思hcv8jop8ns5r.cn 筑基期后面是什么hcv7jop5ns5r.cn 煞科什么意思hcv7jop5ns0r.cn
乳腺纤维瘤是什么原因引起的hcv9jop3ns4r.cn 黄精是什么hcv7jop5ns2r.cn 小孩疳积有什么症状hcv8jop7ns5r.cn rolls是什么意思hcv8jop1ns3r.cn 女性脱发严重是什么原因引起的inbungee.com
一月六号是什么星座hcv7jop4ns7r.cn 1979属什么hcv8jop5ns8r.cn 为什么老是便秘hcv8jop8ns0r.cn 百香果吃了有什么好处hcv8jop5ns8r.cn 眉目的比喻义是什么hcv8jop9ns5r.cn
adhd是什么jiuxinfghf.com 考试早餐吃什么hcv9jop6ns7r.cn lalabobo是什么牌子hcv7jop6ns7r.cn 猪鬃为什么是战略物资hcv9jop3ns9r.cn 跳绳有什么好处hcv7jop5ns5r.cn
百度