Regalamiunsorriso/sync/www-deploy-manifest.md

6.1 KiB

WWW Deployment Manifest

This document lists the files under www/ that changed after the initial www import baseline and should be copied to the remote staging path:

/home/marco/regalamiunsorriso/incoming/www

Baseline Used

  • Excluded the initial www import history by using commit cc69770608bd0f1c32eeac01e16042f4e8a47012 (First commit) as the baseline.
  • Included committed changes after that baseline up to HEAD.
  • Included the current uncommitted workspace change in www/controlCode.jsp.

New Files

  • www/faceai_config.php
  • www/faceai_handoff.php
  • www/faceai_return.php
  • www/faceai_simulator.php
  • www/faceai_simulator_view.php

Updated Files

  • www/_inc_footer.jsp
  • www/_js/rus-ecom-240621.js
  • www/associazione-en.jsp
  • www/associazione.jsp
  • www/atleticaImmagine_chiSiamo-en.jsp
  • www/atleticaImmagine_chiSiamo.jsp
  • www/controlCode-en.jsp
  • www/controlCode.jsp
  • www/includes/inc-header.php
  • www/lostPwd.jsp
  • www/mailMessage/noMorePic.html
  • www/mailMessage/noMorePic.txt
  • www/mailMessage/noMorePicCc.html
  • www/mailMessage/noMorePicScad.html
  • www/mailMessage/noMorePicScad.txt
  • www/mailMessage/perScadereMsg.html
  • www/mailMessage/userMsg_it.html
  • www/mailMessage/userMsg_itCC.html
  • www/newsCR-en.jsp
  • www/newsCR.jsp
  • www/pg/controlCode.jsp
  • www/pg/logon.jsp
  • www/pg/registra.jsp
  • www/users-en.jsp
  • www/users.jsp

Local Workspace-Only Change Included

  • www/controlCode.jsp currently has an uncommitted local modification and should be deployed from the working tree version, not just from HEAD.

Remote Copy Target

  • Source root: K:\various\regalamiunsorriso
  • Remote host: marco@83.149.164.4:410
  • Remote path: /home/marco/regalamiunsorriso/incoming/www
  • Total files in this manifest: 30

Transfer Notes

  • Transfer completed by streaming a tar archive over SSH and extracting it into /home/marco/regalamiunsorriso/incoming so the www/... directory structure was preserved.
  • Representative remote verification succeeded for new files and updated files, including www/faceai_config.php, www/faceai_handoff.php, www/faceai_return.php, www/faceai_simulator.php, www/faceai_simulator_view.php, www/controlCode.jsp, www/_js/rus-ecom-240621.js, www/includes/inc-header.php, and www/pg/logon.jsp.
  • www/controlCode.jsp was uploaded from the local working tree, which includes an uncommitted change.

Issues Encountered

  • The remote login shell behaves as tcsh, so POSIX shell loops like for ...; do ...; done fail unless they are explicitly run through sh -c.
  • The server sh does not accept the -l option, so verification commands must use sh -c, not sh -lc.
  • The direct SSH and tar-based copy path works; the MCP SSH tools were not used for this transfer because they were previously failing authentication or transport checks.

Single-File Live Promotion Test

  • Tested file: www/associazione-en.jsp
  • Staged source: /home/marco/regalamiunsorriso/incoming/www/associazione-en.jsp
  • Live destination: /home/sites/regalamiunsorriso/www/associazione-en.jsp
  • Original live metadata before copy: owner jenkins, group www, mode 100644, size 6289
  • Live metadata after copy: owner jenkins, group www, mode 100644, size 6139
  • Content verification after copy succeeded: cksum matched for staged and live files.

Promotion Script

  • Local template: sync/promote-file.sh
  • Remote installed script: /home/marco/promote-file.sh
  • Purpose: copy one source file to one destination file, then restore the destination file owner, group, and mode from the original live file.
  • Supports an optional third argument: a metadata source file to use when the destination file does not exist yet and the target directory has mixed permission patterns.

Command That Worked

ssh -tt -i C:\Users\Maddo\.ssh\id_rsa -p 410 marco@83.149.164.4 "sudo tcsh -c '/home/marco/promote-file.sh /home/marco/regalamiunsorriso/incoming/www/associazione-en.jsp /home/sites/regalamiunsorriso/www/associazione-en.jsp'"

Additional Problems Found During Live Promotion

  • Uploading a multi-line script inline from PowerShell was unreliable in the local terminal because the prompt layer interfered with the here-string before SSH execution. Using a normal local file plus scp worked cleanly.
  • The live-site verification command was interrupted once when run in parallel with the promotion command. Re-running verification separately avoided that issue.
  • Promotion to /home/sites/regalamiunsorriso/www must run through sudo tcsh; copying as marco alone is not sufficient for the live path and would not preserve the required live ownership.
  • Root-level PHP files on the live site do not have a single uniform mode. For example, _inc_footer.php and gallery1.php are 775, while test.php is 644. The promotion helper was extended to accept an explicit metadata source so new files can follow a chosen live pattern instead of relying on the first sibling match.
  1. Stage the file under /home/marco/regalamiunsorriso/incoming/www/....
  2. Inspect the live destination metadata before changing anything.
  3. Run /home/marco/promote-file.sh <staged-path> <live-path> [metadata-source] through sudo tcsh in an SSH session opened with -tt.
  4. Verify the live file with ls -l, stat -f, and cksum against the staged source.

Full Live Promotion Result

  • After the single-file test with www/associazione-en.jsp, the remaining 29 files in the manifest were promoted successfully to /home/sites/regalamiunsorriso/www.
  • Existing destination files kept their original live owner, group, and mode.
  • The new faceai_*.php files were created as jenkins:www with mode 775, using /home/sites/regalamiunsorriso/www/_inc_footer.php as the explicit metadata source.
  • Representative content verification succeeded with matching cksum values for:
    • www/faceai_config.php
    • www/controlCode.jsp
    • www/pg/logon.jsp
  • Representative metadata verification succeeded for updated files in root, pg, includes, and mailMessage directories.