Commit 96016c0a authored by free-pmx's avatar free-pmx
Browse files

v0.3.3

parent 0ab864e9
Loading
Loading
Loading
Loading
+109 −0
Original line number Diff line number Diff line
name: Bug
description: |
  Any malfunction, deficiency, unexpected or undocumented behaviour.
labels: ["bug", "triage"]
body:
  - type: markdown
    attributes:
      value: |
        Freely-worded, but concise and specific titles are the best.

        ### Before you begin, please ...

        - confirm the issue is not addressed on the [project homepage](https://free-pmx.org/tools/free-pmx-no-subscription/); and
        - check if there is no existing [issue](/free-pmx/free-pmx-no-subscription/issues?q=is%3Aissue) about the same; and
        - verify whether the problem is reproducible (e.g. with a *separate system*, *browser*, etc.) or environment-specific.

        *Your effort spent on the above is highly valued.*
  - type: checkboxes
    id: acknowledgement
    attributes:
      label: Acknowledgement
      options:
        - label: I have done my best with the above checks.
          required: true
  - type: dropdown
    id: tool
    attributes:
      label: Tool affected
      description: |
        Package contains two separate tools:
        - **NO-SUBSCRIPTION** sets up APT repositories;
        - **NO-NAG** removes popup notice, etc.

        Each tool shows a respective name header during run, including when automated.
      options:
        - N/A
        - NO-SUBSCRIPTION
        - NO-NAG
    validations:
      required: true
  - type: checkboxes
    id: system
    attributes:
      label: "System(s) affected"
      description: |
        Known host system(s) which exhibit the issue.
      options:
        - label: Proxmox Virtual Environment
        - label: Proxmox Backup Server
        - label: Proxmox Mail Gateway
  - type: checkboxes
    id: other
    attributes:
      label: "Other notable circumstances"
      options:
        - label: A *non-stock system install* (e.g. manual install on top of Debian).
        - label: Issue presented itself *only after a system upgrade*.
  - type: textarea
    id: versions
    attributes:
      label: "Component versions"
      description: |
        Individual system component versions. If not applicable/available, state so instead.
      placeholder: |
        free-pmx-no-subscription/now 0.3.0 all [installed,local]
        proxmox-widget-toolkit/stable,now 5.0.5 all [installed]
        pve-manager/stable,now 9.0.3 all [installed]
      render: shell
    validations:
      required: true
  - type: markdown
    attributes:
      value: |
        The output such as above can be obtained from a command-line interface (host shell, SSH):

        ```
        apt list free-pmx-no-subscription proxmox-widget-toolkit pve-manager proxmox-backup-server pmg-gui
        ```
  - type: textarea
    id: log
    attributes:
      label: Log
      description: Paste related terminal output, if any.
      placeholder: |
        Automated tool runs - during install - also log its terminal output into:

            /var/log/apt/term.log
      render: shell
  - type: markdown
    attributes:
      value: |
        Large logs can be attached as files at the end.
  - type: textarea
    id: description
    attributes:
      label: Description
      description: What undesirable happens and what was expected instead?
      placeholder: Attachments can be added below.
    validations:
      required: true
  - type: markdown
    attributes:
      value: |

        ---

        *Each filing is treated as a contribution.*

        ### Thank you again for taking the time and effort to fill out this report.
+25 −0
Original line number Diff line number Diff line
name: Other
description: |
  Any other report, e.g. enhancement request, code review or general feedback.
labels: ["enhancement", "triage"]
body:
  - type: markdown
    attributes:
      value: |
        Freely-worded, but concise and specific titles are the best.
  - type: textarea
    id: description
    attributes:
      label: Description
      placeholder: Attachments can be added below.
    validations:
      required: true
  - type: markdown
    attributes:
      value: |

        ---

        *Each filing is treated as a contribution.*

        ### Thank you again for taking the time and effort to fill out this report.
+5 −0
Original line number Diff line number Diff line
blank_issues_enabled: false
contact_links:
  - name: Project homepage
    url: https://free-pmx.org/tools/free-pmx-no-subscription
    about: Download / install instructions, documentation and more.
+20 −26
Original line number Diff line number Diff line
#!/bin/bash

exec 3>&1 1>&2
trap 'echo "${BASH_SOURCE[0]##*/}: Error $? (l.$LINENO) - aborted."; exit 1;' ERR
source "${BASH_SOURCE[0]%/*}"/util && init || exit 255

out_dir=$(pwd -P)
cd -P "$(dirname "${BASH_SOURCE[0]}")"
repo_dir=${GIT_WORK_TREE:-$out_dir}

p=$(pwd -P); unset build_meta_fname
while [[ -z $build_meta_fname ]] && [[ $p != / ]]; do
    p=$(realpath -s "$p"/..)
    build_meta_fname=$(find "$p" -maxdepth 1 -mindepth 1 \
        -type f -name '*.buildmeta' -printf "%f\n")
done
found_buildmeta=("$repo_dir"/*.buildmeta)
((${#found_buildmeta[@]} == 1))
buildmeta=${found_buildmeta[0]}
[[ -f $buildmeta ]]
buildmeta_fname=${buildmeta##*/}

[[ -n $build_meta_fname ]]
[[ $(wc -l <<< "$build_meta_fname") == 1 ]]

target="${build_meta_fname%%.buildmeta}"
target="${buildmeta_fname%%.buildmeta}"
package=${target%%_*}
version=${target#*_}

./req-perms "$p/$package"

source "$p/$build_meta_fname"
(cd "$repo_dir" && source .permsrc || exit 1)

source "$buildmeta"
export SOURCE_DATE_EPOCH DPKG_DEB_COMPRESSOR_TYPE

tmp_deb=$(mktemp "$package"_XXXXXX.deb)
dpkg-deb --build --root-owner-group "$p/$package" "$tmp_deb"
dpkg-deb --build --root-owner-group "$repo_dir/$package" "$tmp_deb"

read -r deb_package deb_version <<< "$(
    dpkg-deb --show --showformat='${Package} ${Version}\n' \
@@ -49,6 +44,13 @@ DEB_INFO=$out_dir/$deb_info_fname

EOF

cat >> "$out_dir/$deb_info_fname" << EOF
GIT_URL=$GIT_URL
GIT_COMMIT=$GIT_COMMIT
GIT_REF=$GIT_REF

EOF

tee "$out_dir/$deb_info_fname" >&3 << EOF
DEB_PACKAGE=$deb_package
DEB_VERSION=$deb_version
@@ -58,14 +60,6 @@ DEB_URL=$DEB_URL

EOF

cat >> "$out_dir/$deb_info_fname" << EOF
GIT_URL=$GIT_URL
GIT_COMMIT=$GIT_COMMIT
GIT_REF=$GIT_REF

EOF

cat >&3 << EOF
CHECK_BUILD=pass

EOF
+4 −7
Original line number Diff line number Diff line
#!/bin/bash

exec 3>&1 1>&2
trap 'echo "${BASH_SOURCE[0]##*/}: Error $? (l.$LINENO) - aborted."; exit 1;' ERR
source "${BASH_SOURCE[0]%/*}"/util && init || exit 255

cd -P "$(dirname "${BASH_SOURCE[0]}")"

./req-apt wget
req_apt wget

tmp_deb=$(mktemp "/tmp/$DEB_PACKAGE"_XXXXXX.deb)
wget --no-verbose -O "$tmp_deb" "$DEB_URL"
sha256sum --check <<< "$DEB_SHA256  $tmp_deb"

cat >&3 << EOF
CHECK_URL_LAST=$(date)
CHECK_URL=pass
CHECK_URL_LAST=$(date --rfc-3339=seconds --utc)

CHECK_URL=pass
EOF
Loading