In workflow action run 10753 (job 11814), the Windows release package Argyll_v3.5.0-ICCery.1.0_b763dd7_win64_exe.zip was built without USB drivers, HTML documentation, and root files (ReadMe.txt, License.txt).
Root Cause Analysis
During the Package Release step in makepackagebin.sh, the script collects filenames to copy using command substitutions on manifest files:
unset topfiles;for i in `cat binfiles`;dotopfiles="$topfiles${i}";doneunset docfiles;for i in `cat doc/afiles`;dodocfiles="$docfiles doc/${i}";doneunset usbfiles;for j in ${USBDIRS};doif[${j}];thenfor i in `cat ${j}/${USBBINFILES}`;dousbfiles="$usbfiles${j}/${i}";donefidone
Because binfiles, doc/afiles, and usb/binfiles.msw contain DOS line endings (\r\n), each token read into $i contains a trailing carriage return (\r).
When cp $i $TOPDIR/$i is executed, the destination/source lookup fails for every entry with errors such as:
cp: cannot stat 'ReadMe.txt'$'\r': No such file or directory
cp: cannot stat 'License.txt'$'\r': No such file or directory
cp: cannot stat 'doc/ArgyllDoc.html'$'\r': No such file or directory
cp: cannot stat 'usb/ArgyllCMS_install_USB.exe'$'\r': No such file or directory
cp: cannot stat 'usb/ArgyllCMS_uninstall_USB.exe'$'\r': No such file or directory
cp: cannot stat 'usb/ArgyllCMS.cat'$'\r': No such file or directory
cp: cannot stat 'usb/ArgyllCMS.inf'$'\r': No such file or directory
cp: cannot stat 'usb/bin/x86/libusb0.sys'$'\r': No such file or directory
cp: cannot stat 'usb/bin/amd64/libusb0.sys'$'\r': No such file or directory
Only bin/* and ref/* were included in the archive because they were expanded via shell globbing rather than manifest file reading.
Additionally:
usb/binfiles.msw references ArgyllCMS_x64.cat and ArgyllCMS_arm64.cat, which are generated by usb/makecat.bat as copies of ArgyllCMS.cat but are not pre-committed or generated when inf2cat is not present.
Proposed Remediation Plan
Sanitize Line Endings in makepackagebin.sh:
Filter manifest file contents with tr -d '\r' before iterating over items (or run dos2unix / normalize line endings).
Handle Catalog Files in usb/:
Ensure usb/ArgyllCMS_x64.cat and usb/ArgyllCMS_arm64.cat are created from usb/ArgyllCMS.cat during build/packaging if not already present.
Verify Packaging in CI:
Add verification check in CI workflow to assert that critical files (usb/ArgyllCMS.inf, usb/bin/amd64/libusb0.sys, doc/ArgyllDoc.html, ReadMe.txt) exist inside the final zip artifact.
### Description
In workflow action run [10753](https://git.i3omb.com/gronod/argyllcms/actions/runs/10753) (job 11814), the Windows release package `Argyll_v3.5.0-ICCery.1.0_b763dd7_win64_exe.zip` was built without USB drivers, HTML documentation, and root files (`ReadMe.txt`, `License.txt`).
### Root Cause Analysis
During the `Package Release` step in `makepackagebin.sh`, the script collects filenames to copy using command substitutions on manifest files:
```bash
unset topfiles; for i in `cat binfiles`; do topfiles="$topfiles ${i}"; done
unset docfiles; for i in `cat doc/afiles`; do docfiles="$docfiles doc/${i}"; done
unset usbfiles;
for j in ${USBDIRS}; do
if [ ${j} ]; then
for i in `cat ${j}/${USBBINFILES}`; do usbfiles="$usbfiles ${j}/${i}"; done
fi
done
```
Because `binfiles`, `doc/afiles`, and `usb/binfiles.msw` contain DOS line endings (`\r\n`), each token read into `$i` contains a trailing carriage return (`\r`).
When `cp $i $TOPDIR/$i` is executed, the destination/source lookup fails for every entry with errors such as:
```text
cp: cannot stat 'ReadMe.txt'$'\r': No such file or directory
cp: cannot stat 'License.txt'$'\r': No such file or directory
cp: cannot stat 'doc/ArgyllDoc.html'$'\r': No such file or directory
cp: cannot stat 'usb/ArgyllCMS_install_USB.exe'$'\r': No such file or directory
cp: cannot stat 'usb/ArgyllCMS_uninstall_USB.exe'$'\r': No such file or directory
cp: cannot stat 'usb/ArgyllCMS.cat'$'\r': No such file or directory
cp: cannot stat 'usb/ArgyllCMS.inf'$'\r': No such file or directory
cp: cannot stat 'usb/bin/x86/libusb0.sys'$'\r': No such file or directory
cp: cannot stat 'usb/bin/amd64/libusb0.sys'$'\r': No such file or directory
```
Only `bin/*` and `ref/*` were included in the archive because they were expanded via shell globbing rather than manifest file reading.
Additionally:
- `usb/binfiles.msw` references `ArgyllCMS_x64.cat` and `ArgyllCMS_arm64.cat`, which are generated by `usb/makecat.bat` as copies of `ArgyllCMS.cat` but are not pre-committed or generated when `inf2cat` is not present.
### Proposed Remediation Plan
1. **Sanitize Line Endings in `makepackagebin.sh`**:
- Filter manifest file contents with `tr -d '\r'` before iterating over items (or run `dos2unix` / normalize line endings).
2. **Handle Catalog Files in `usb/`**:
- Ensure `usb/ArgyllCMS_x64.cat` and `usb/ArgyllCMS_arm64.cat` are created from `usb/ArgyllCMS.cat` during build/packaging if not already present.
3. **Verify Packaging in CI**:
- Add verification check in CI workflow to assert that critical files (`usb/ArgyllCMS.inf`, `usb/bin/amd64/libusb0.sys`, `doc/ArgyllDoc.html`, `ReadMe.txt`) exist inside the final zip artifact.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Description
In workflow action run 10753 (job 11814), the Windows release package
Argyll_v3.5.0-ICCery.1.0_b763dd7_win64_exe.zipwas built without USB drivers, HTML documentation, and root files (ReadMe.txt,License.txt).Root Cause Analysis
During the
Package Releasestep inmakepackagebin.sh, the script collects filenames to copy using command substitutions on manifest files:Because
binfiles,doc/afiles, andusb/binfiles.mswcontain DOS line endings (\r\n), each token read into$icontains a trailing carriage return (\r).When
cp $i $TOPDIR/$iis executed, the destination/source lookup fails for every entry with errors such as:Only
bin/*andref/*were included in the archive because they were expanded via shell globbing rather than manifest file reading.Additionally:
usb/binfiles.mswreferencesArgyllCMS_x64.catandArgyllCMS_arm64.cat, which are generated byusb/makecat.batas copies ofArgyllCMS.catbut are not pre-committed or generated wheninf2catis not present.Proposed Remediation Plan
makepackagebin.sh:tr -d '\r'before iterating over items (or rundos2unix/ normalize line endings).usb/:usb/ArgyllCMS_x64.catandusb/ArgyllCMS_arm64.catare created fromusb/ArgyllCMS.catduring build/packaging if not already present.usb/ArgyllCMS.inf,usb/bin/amd64/libusb0.sys,doc/ArgyllDoc.html,ReadMe.txt) exist inside the final zip artifact.