
<!DOCTYPE html>
<html lang='en'>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>Tree - rpms/nodejs18 - src.fedoraproject.org</title>
        <link rel="shortcut icon" type="image/vnd.microsoft.icon"
        href="/theme/static/favicon.ico?version=5.14.1"/>
    <link href="/theme/static/fedora-bootstrap-1.3.0/fedora-bootstrap.min.css?version=5.14.1"
        type="text/css" rel="stylesheet" />
    <link href="/theme/static/fonts/fonts.css?version=5.14.1"
        rel="stylesheet" type="text/css" />
    <link href="/theme/static/fonts/hack_fonts/css/hack-extended.min.css?version=5.14.1"
        type="text/css" rel="stylesheet" />
    <link href="/theme/static/theme.css?version=5.14.1"
        type="text/css" rel="stylesheet" />

    <link type="text/css" rel="stylesheet" nonce="L2aEi5eAKYxWKh00jfb150S2u" href="/static/vendor/font-awesome/font-awesome.css?version=5.14.1"/>
    <link type="text/css" rel="stylesheet" nonce="L2aEi5eAKYxWKh00jfb150S2u" href="/static/pagure.css?version=5.14.1"/>
<link nonce="L2aEi5eAKYxWKh00jfb150S2u" rel="stylesheet" href="/static/vendor/highlight.js/styles/github.css?version=5.14.1"/>
<link nonce="L2aEi5eAKYxWKh00jfb150S2u" rel="stylesheet" href="/static/vendor/highlightjs-line-numbers/highlightjs-line-numbers.min.css?version=5.14.1"/>
<style nonce="L2aEi5eAKYxWKh00jfb150S2u">
  .hljs {
    background: #fff;
  }
</style>
  </head>
  <body id="home">
    
    <!-- start masthead -->
    <nav class="navbar navbar-light masthead p-0 navbar-expand">
      <div class="container">
        <a href="/" class="navbar-brand">
        <img height="40" src="/theme/static/pagure-logo.png?version=5.14.1"
             alt="pagure Logo" id="pagureLogo"/>
        </a>
        <ul class="navbar-nav ml-auto">

          

          <li class="nav-item">
            <a class="btn btn-primary" href="/login/?next=https://src.fedoraproject.org/rpms/nodejs18/blob/f42/f/nodejs-sources.sh">Log In</a>
          </li>
        </ul>
      </div>
    </nav>
    <!-- close masthead-->

    <div class="bodycontent">


<div class="bg-light border border-bottom pt-3">
  <div class="container">
    <div class="row mb-3">
      <div class="col-6">
        <div class="row">
        <div class="col-auto pr-0">
            <h3>
<i class="fa fa-archive text-muted"></i></h3>
        </div>
        <div class="col-auto pl-2">
            <h3 class="mb-0">
<a href="/projects/rpms/%2A">rpms</a>&nbsp;/&nbsp;<a href="/rpms/nodejs18"><strong>nodejs18</strong></a>
            </h3>
        </div>
        </div>
      </div>
      <div class="col-6 text-right">
        <div class="btn-group">
        <div class="btn-group">
        <a href="#"
            class="btn btn-sm dropdown-toggle btn-outline-primary"
            data-toggle="dropdown" id="watch-button">
          <i class="fa fa-clone fa-fw"></i>
          <span>Clone</span>
        </a>
        <div class="dropdown-menu dropdown-menu-right">
          <div class="m-3" id="source-dropdown">
            <div>
              <h5><strong>Source Code</strong></h5>

              <div class="form-group">
                <div class="input-group input-group-sm">
                  <div class="input-group-prepend"><span class="input-group-text">GIT</span></div>
                  <input class="form-control bg-white select-on-focus" type="text" value="https://src.fedoraproject.org/rpms/nodejs18.git" readonly>
                </div>
              </div>
            </div>
          </div>
        </div>

      </div>
    </div>
  </div>
</div>

<ul class="nav nav-tabs nav-small border-bottom-0">
  <li class="nav-item mr-2 text-dark">
    <a class="nav-link active" href="/rpms/nodejs18">
        <i class="fa fa-code fa-fw text-muted"></i>
        <span class="d-none d-md-inline">Source</span>
    </a>
  </li>

    <li class="nav-item mr-2 text-dark">
        <a class="nav-link" href="https://bugzilla.redhat.com/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&classification=Fedora&product=Fedora&product=Fedora EPEL&component=nodejs18">
          <i class="fa fa-fw text-muted fa-exclamation-circle"></i>
          <span class="d-none d-md-inline">Issues&nbsp;</span>
          <span class="fa fa-external-link"></span>
        </a>
    </li>

    <li class="nav-item mr-2 text-dark">
      <a class="nav-link" href="/rpms/nodejs18/pull-requests">
          <i class="fa fa-fw text-muted fa-arrow-circle-down"></i>
          <span class="d-none d-md-inline">Pull Requests&nbsp;</span>
          <span class="badge badge-secondary py-0 d-none d-md-inline">
            0
          </span>
      </a>
    </li>


    <li class="nav-item mr-2 text-dark">
      <a class="nav-link" href="/rpms/nodejs18/stats">
          <i class="fa fa-line-chart fa-fw text-muted"></i>
          <span class="d-none d-md-inline">Stats</span>
      </a>
    </li>


</ul>
  </div>
</div>

<div class="container pt-5 repo-body-container">
  <!-- template: file.html -->
  <div class="row">
    <div class="col-2">
<nav class="nav nav-tabs nav-sidetabs flex-column flex-nowrap">
  <a class=
      "nav-link nowrap
"
      href="/rpms/nodejs18">
      <i class="fa fa-home text-muted fa-fw"></i>&nbsp;<span class="d-none d-md-inline">Overview</span>
  </a>
  <a class=
    "nav-link nowrap
 active"
    href="/rpms/nodejs18/tree/f42">
    <i class="fa fa-file-code-o text-muted fa-fw"></i>&nbsp;Files
  </a>
  <a class=
    "nav-link nowrap
"
    href="/rpms/nodejs18/commits/f42">
    <i class="fa fa-list-alt text-muted fa-fw" data-glyph="spreadsheet"></i>&nbsp;Commits
  </a>
  <a class=
    "nav-link nowrap
"
    href="/rpms/nodejs18/branches?branchname=f42">
    <i class="fa fa-random text-muted fa-fw"></i>&nbsp;Branches
  </a>
  <a class=
    "nav-link nowrap
"
    href="/rpms/nodejs18/forks">
    <i class="fa fa-code-fork text-muted fa-fw"></i>&nbsp;Forks
  </a>
  <a class=
    "nav-link nowrap
"
    href="/rpms/nodejs18/releases">
    <i class="fa fa-tags text-muted fa-fw"></i>&nbsp;Releases
  </a>

  <div class="line-height-1"></div>
  <h6>Monitoring status:</h6>
  <div class="btn-group">
    <button title="Monitoring status" class="btn btn-sm btn-outline-primary disabled"
        id="monitoring-button">
      <i id="monitoring-icon" class="fa fa-fw fa-eye"></i>
      <span id="monitoring-label" class="fa fa-circle-o-notch fa-spin fa-1x fa-fw"></span>
    </button>
  </div>

  <div class="line-height-1"></div>
  <div id="orphan-section" class="pt-3 enforce-text-break">
      <div class="line-height-1"></div>

  </div>

  <div class="pt-3">
    <div class="line-height-1">
    <h6>Bugzilla Assignee:</h6>
      <dl>
        <dt>Fedora: </dt>
        <dd id="fedora_assignee_txt">
        jstanek
        </dd>
        <dt>EPEL: </dt>
        <dd id="epel_assignee_txt">
        jstanek
        </dd>
      </dl>
    </div>
  </div>

  <div class="modal fade" id="modal_assignee" tabindex="-1"
          role="dialog" aria-labelledby="Bugzilla assignee" aria-hidden="true">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <h4 class="modal-title">Bugzilla Assignee</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
            <span class="sr-only">Close</span>
          </button>
        </div>
        <form id="change_assignees">
          <div class="modal-body">
            <label for="fedora_assignee">Fedora</label>
            <input title="Default assignee for Fedora in bugzilla - Empty input resets to default"
              class="form-control" name="fedora_assignee" id="fedora_assignee" value="jstanek"/>
            <label for="epel_assignee">EPEL</label>
            <input title="Default assignee for EPEL in bugzilla (if applicable) - Empty input resets to default"
              class="form-control" name="epel_assignee" id="epel_assignee" value="jstanek" />
            <p class="pt-2">
              These two fields allow to specify a different default assignee for ticket opened against
              this package in bugzilla. Note: The EPEL field is
              always displayed for packages in the 'rpms' namespace regardless of whether it
              is used in bugzilla or not.            </p>
          </div>
          <div class="modal-footer">
            <button class="btn btn-secondary" type="button" title="Update bugzilla overrides" id="reset_assignees">
               Reset to defaults
            </button>
            <button class="btn btn-primary" type="submit" title="Update bugzilla overrides" id="update_assignees">
               Update
            </button>
          </div>
        </form>
      </div>
    </div>
  </div>

  <div class="modal fade" id="modal_orphan" tabindex="-1"
          role="dialog" aria-labelledby="Orphan this package" aria-hidden="true">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <h4 class="modal-title">Orphan package</h4>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
            <span class="sr-only">Close</span>
          </button>
        </div>
          <div class="modal-body">
            <div class="form-group">
              <label for="reason_menu">Reason</label>
              <select id="reason_menu" class="form-control">

                <option id="lack_of_time_option_button">Lack of time</option>

                <option id="do_not_use_it_option_button">Do not use it anymore</option>

                <option id="unmaintained_option_button">Unmaintained upstream</option>

                <option id="fails_to_build_option_button">Fails to build from source</option>

                <option id="not_fixed_option_button">Important bug not fixed</option>

                <option id="other_option_button">Other</option>
              </select>
            </div>
          <label for="orphan_reason_info">Additional info</label>
          <input title="Additional info for orphaning reason"
                  class="form-control" name="orphan_reason_info" id="orphan_reason_info" value=""/>
          </div>
          <div class="modal-footer">
            <button class="btn btn-primary" type="submit" title="Orphan this package" id="orphan_button">
               Update
            </button>
          </div>
      </div>
    </div>
  </div>

  <script type="text/javascript" nonce="L2aEi5eAKYxWKh00jfb150S2u">
    window.addEventListener('load', function() {
      set_up_monitoring = function(status){
        var _label = "Disabled"
        if (status === "monitoring") {
          _label = "Monitoring";
          $("#monitoring-icon").attr("class", "fa fa-fw fa-eye")
        } else if (status === "monitoring-with-scratch") {
          _label = "Scratch builds"
          $("#monitoring-icon").attr("class", "fa fa-fw fa-eye")
        } else if (status === "monitoring-all") {
          _label = "Monitoring all"
          $("#monitoring-icon").attr("class", "fa fa-fw fa-eye")
        } else if (status === "monitoring-all-scratch") {
          _label = "All - Scratch builds"
          $("#monitoring-icon").attr("class", "fa fa-fw fa-eye")
        } else if (status === "monitoring-stable") {
          _label = "Monitoring stable"
          $("#monitoring-icon").attr("class", "fa fa-fw fa-eye")
        } else if (status === "monitoring-stable-scratch") {
          _label = "Stable - Scratch builds"
          $("#monitoring-icon").attr("class", "fa fa-fw fa-eye")
        } else {
          $("#monitoring-icon").attr("class", "fa fa-fw fa-eye-slash")
        }

        $("#monitoring-label").text(_label);
        $("#monitoring-label").removeClass("fa fa-circle-o-notch fa-spin fa-1x fa-fw");
      }

      $.ajax({
        url: "/_dg/anitya/rpms/nodejs18",
        type: 'GET',
        dataType: 'json',
        success: function(res) {
          console.log(res);
          set_up_monitoring(res.monitoring)
        }
      });


      $("#reset_assignees").on('click', function(){
        $('#fedora_assignee').val('');
        $('#epel_assignee').val('');
        $("#change_assignees").submit();
        return false;
      });

      $("#change_assignees").on('submit',  function(){
        $('html').css('cursor', 'progress');
        $('#reset_assignees').attr('disabled', true);
        $('#update_assignees').attr('disabled', true);
        $('#update_assignees').text('Updating...');
        $.ajax({
          url: "/_dg/bzoverrides/rpms/nodejs18",
          type: 'POST',
          dataType: 'json',
          data: {
             'epel_assignee': $('#epel_assignee').val(),
             'fedora_assignee': $('#fedora_assignee').val()
          },
          success: function(res) {
            $("#fedora_assignee_txt").text(res.fedora_assignee);
            $("#epel_assignee_txt").text(res.epel_assignee);
            $('#modal_assignee').modal('hide');
            $('#reset_assignees').attr('disabled', false);
            $('#update_assignees').attr('disabled', false);
            $('#update_assignees').text('Update');
            $('html').css('cursor', 'default');
            console.log("Successfully changed the bugzilla assignees");
            return false;
          },
          error: function(res) {
            var msg = '';
            if(res.responseJSON.errors){
              msg = ': ' + res.responseJSON.errors.join(', ');
            }
            alert("Unable to update the bugzilla assignee(s)" + msg);
            $('html').css('cursor', 'default');
            $('#reset_assignees').attr('disabled', false);
            $('#update_assignees').attr('disabled', false);
            $('#update_assignees').text('Update');
            return false;
          }
        })
        return false;
      });


      $.ajax({
        url: "/_dg/actived/rpms/nodejs18",
        type: 'GET',
        dataType: 'json',
        success: function(res) {
          var _btn = $("#take_orphan_button");
          if (!res.active){
            _btn.off("click");
            _btn.click(function(){
                window.open(
                    "https://pagure.io/releng/new_issue?title="
                    + "Unretire rpms/nodejs18"
                    + "&amp;template=package_unretirement");
            });
            _btn.prop( "title", "Package retired - Open a releng ticket to adopt it" );
            _btn.html("Retired");
          }
          _btn.removeClass('disabled');
        }
      });

      $("#orphan_button").click(function(){
        $("#orphan_button").attr("disabled", true);
        $.ajax({
          url: "/_dg/orphan/rpms/nodejs18",
          type: 'POST',
          dataType: 'json',
          data: {
            'orphan_reason': $('#reason_menu').val(),
            'orphan_reason_info': $('#orphan_reason_info').val()
          },
          success: function(res) {
            $("#point_of_contact_div").html("Package is currently unmaintained");
            $("#orphan_button").attr("disabled", false);
            $('#modal_orphan').modal('hide');
            $('#orphan-section').html('');
          },
          error: function(res) {
            if (res.responseJSON.errors) {
              alert('Unable to orphan the package: ' + res.responseJSON.errors);
            } else {
              alert('Unable to orphan the package: ' + res.responseJSON.error);
            }
            $("#orphan_button").attr("disabled", false);
          }
        });
      });
    });
  </script>

</nav>    </div>
    <div class="col-10">
  <div class="row mb-1">
    <div class="col-sm-6">
    <h3>
      Files
    </h3>
    </div>

    <div class="col-sm-6 text-right">
          <div class="btn-group">
            <a href="#" class="btn btn-outline-light border-secondary text-dark btn-sm dropdown-toggle"
                    data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    <span class="fa fa-random fa-fw"></span> Branch: <span class="font-weight-bold">f42</span>
            </a>
            <div class="dropdown-menu dropdown-menu-right">
                  <a class="dropdown-item pl-1 " href="/rpms/nodejs18/tree/f36">
                      <span class="fa fa-random fa-fw"></span> <span class="">f36</span>
                  </a>
                  <a class="dropdown-item pl-1 " href="/rpms/nodejs18/tree/f37">
                      <span class="fa fa-random fa-fw"></span> <span class="">f37</span>
                  </a>
                  <a class="dropdown-item pl-1 " href="/rpms/nodejs18/tree/f38">
                      <span class="fa fa-random fa-fw"></span> <span class="">f38</span>
                  </a>
                  <a class="dropdown-item pl-1 " href="/rpms/nodejs18/tree/f39">
                      <span class="fa fa-random fa-fw"></span> <span class="">f39</span>
                  </a>
                  <a class="dropdown-item pl-1 " href="/rpms/nodejs18/tree/f40">
                      <span class="fa fa-random fa-fw"></span> <span class="">f40</span>
                  </a>
                  <a class="dropdown-item pl-1 " href="/rpms/nodejs18/tree/f41">
                      <span class="fa fa-random fa-fw"></span> <span class="">f41</span>
                  </a>
                  <a class="dropdown-item pl-1 active" href="/rpms/nodejs18/tree/f42">
                      <span class="fa fa-random fa-fw"></span> <span class="font-weight-bold">f42</span>
                  </a>
                  <a class="dropdown-item pl-1 " href="/rpms/nodejs18/tree/main">
                      <span class="fa fa-random fa-fw"></span> <span class="">main</span>
                  </a>
                  <a class="dropdown-item pl-1 " href="/rpms/nodejs18/tree/rawhide">
                      <span class="fa fa-random fa-fw"></span> <span class="">rawhide</span>
                  </a>
            </div>
          </div>
    </div>
  </div>
    <!-- .card -->
    <div class="card mb-3">
      <div class="card-header">
        <ol class="breadcrumb p-0 bg-transparent mb-0">
          <li class="breadcrumb-item">
            <a href="/rpms/nodejs18/tree/f42">
              <span class="fa fa-random">
              </span>&nbsp; f42
            </a>
          </li>
          <li class="active breadcrumb-item">
            <span class="fa fa-file" data-glyph="">
            </span>&nbsp; nodejs-sources.sh
          </li>
        </ol>
      </div>

  <div class="card-body p-0">
            <div class="bg-light border text-right pr-2 py-1">
                <form class="d-inline mx-2" method="POST" name="fork_project"
                    action="/fork_edit/rpms/nodejs18/edit/f42/f/nodejs-sources.sh">
                    <button class="btn btn-sm btn-secondary fork_project_btn">
                            Fork and Edit
                    </button>
                    
                </form>

                <a class="btn btn-secondary btn-sm" href="/rpms/nodejs18/blob/f42/f/nodejs-sources.sh" title="View as blob">Blob</a>

                <a class="btn btn-secondary btn-sm" href="/rpms/nodejs18/blame/nodejs-sources.sh?identifier=f42" title="View git blame">Blame</a>

                <a class="btn btn-secondary btn-sm" href="/rpms/nodejs18/history/nodejs-sources.sh?identifier=f42" title="View git log for this file">History</a>

                <a class="btn btn-secondary btn-sm" href="/rpms/nodejs18/raw/f42/f/nodejs-sources.sh" title="View as raw">Raw</a>
            </div>

        <pre class="syntaxhighlightblock"><code class="">#!/bin/sh
# Uses Argbash to generate command argument parsing. To update
# arguments, make sure to call
# `argbash nodejs-tarball.sh -o nodejs-tarball.sh`

# ARG_POSITIONAL_SINGLE([version],[Node.js release version])
# ARG_OPTIONAL_BOOLEAN([push],[],[Whether to upload to the lookaside cache],[on])
# ARG_OPTIONAL_BOOLEAN([debug],[],[Print all commands],[off])
# ARG_DEFAULTS_POS([])
# ARG_HELP([Tool to aid in Node.js packaging of new releases])
# ARGBASH_GO()
# needed because of Argbash --&gt; m4_ignore([
### START OF CODE GENERATED BY Argbash v2.10.0 one line above ###
# Argbash is a bash code generator used to get arguments parsing right.
# Argbash is FREE SOFTWARE, see https://argbash.io for more info


die()
{
	local _ret=&#34;${2:-1}&#34;
	test &#34;${_PRINT_HELP:-no}&#34; = yes &amp;&amp; print_help &gt;&amp;2
	echo &#34;$1&#34; &gt;&amp;2
	exit &#34;${_ret}&#34;
}


begins_with_short_option()
{
	local first_option all_short_options=&#39;h&#39;
	first_option=&#34;${1:0:1}&#34;
	test &#34;$all_short_options&#34; = &#34;${all_short_options/$first_option/}&#34; &amp;&amp; return 1 || return 0
}

# THE DEFAULTS INITIALIZATION - POSITIONALS
_positionals=()
_arg_version=
# THE DEFAULTS INITIALIZATION - OPTIONALS
_arg_push=&#34;on&#34;
_arg_debug=&#34;off&#34;


print_help()
{
	printf &#39;%s\n&#39; &#34;Tool to aid in Node.js packaging of new releases&#34;
	printf &#39;Usage: %s [--(no-)push] [--(no-)debug] [-h|--help] &lt;version&gt;\n&#39; &#34;$0&#34;
	printf &#39;\t%s\n&#39; &#34;&lt;version&gt;: Node.js release version&#34;
	printf &#39;\t%s\n&#39; &#34;--push, --no-push: Whether to upload to the lookaside cache (on by default)&#34;
	printf &#39;\t%s\n&#39; &#34;--debug, --no-debug: Print all commands (off by default)&#34;
	printf &#39;\t%s\n&#39; &#34;-h, --help: Prints help&#34;
}


parse_commandline()
{
	_positionals_count=0
	while test $# -gt 0
	do
		_key=&#34;$1&#34;
		case &#34;$_key&#34; in
			--no-push|--push)
				_arg_push=&#34;on&#34;
				test &#34;${1:0:5}&#34; = &#34;--no-&#34; &amp;&amp; _arg_push=&#34;off&#34;
				;;
			--no-debug|--debug)
				_arg_debug=&#34;on&#34;
				test &#34;${1:0:5}&#34; = &#34;--no-&#34; &amp;&amp; _arg_debug=&#34;off&#34;
				;;
			-h|--help)
				print_help
				exit 0
				;;
			-h*)
				print_help
				exit 0
				;;
			*)
				_last_positional=&#34;$1&#34;
				_positionals+=(&#34;$_last_positional&#34;)
				_positionals_count=$((_positionals_count + 1))
				;;
		esac
		shift
	done
}


handle_passed_args_count()
{
	local _required_args_string=&#34;&#39;version&#39;&#34;
	test &#34;${_positionals_count}&#34; -ge 1 || _PRINT_HELP=yes die &#34;FATAL ERROR: Not enough positional arguments - we require exactly 1 (namely: $_required_args_string), but got only ${_positionals_count}.&#34; 1
	test &#34;${_positionals_count}&#34; -le 1 || _PRINT_HELP=yes die &#34;FATAL ERROR: There were spurious positional arguments --- we expect exactly 1 (namely: $_required_args_string), but got ${_positionals_count} (the last one was: &#39;${_last_positional}&#39;).&#34; 1
}


assign_positional_args()
{
	local _positional_name _shift_for=$1
	_positional_names=&#34;_arg_version &#34;

	shift &#34;$_shift_for&#34;
	for _positional_name in ${_positional_names}
	do
		test $# -gt 0 || break
		eval &#34;$_positional_name=\${1}&#34; || die &#34;Error during argument parsing, possibly an Argbash bug.&#34; 1
		shift
	done
}

parse_commandline &#34;$@&#34;
handle_passed_args_count
assign_positional_args 1 &#34;${_positionals[@]}&#34;

# OTHER STUFF GENERATED BY Argbash

### END OF CODE GENERATED BY Argbash (sortof) ### ])
# [ &lt;-- needed because of Argbash

if [ $_arg_debug = &#39;on&#39; ]; then
  set -x
fi

SCRIPT_DIR=&#34;$( cd &#34;$( dirname &#34;${BASH_SOURCE[0]}&#34; )&#34; &amp;&amp; pwd )&#34;

alias wget=&#39;wget --quiet&#39;

packages=(&#34;jq&#34; &#34;wget&#34; &#34;tar&#34; &#34;fedpkg&#34; &#34;grep&#34; &#34;sed&#34; &#34;python3-jinja2-cli&#34; &#34;nodejs&#34;)

rpm -q ${packages[@]} &gt;/dev/null
if [ $? -ne 0 ]; then
  sudo dnf -y install ${packages[@]}
fi

set -e

version=$_arg_version

NODE_MAJOR=$(echo $version | cut -d. -f1)
NODE_MINOR=$(echo $version | cut -d. -f2)
NODE_PATCH=$(echo $version | cut -d. -f3)

# Treat odd-numbered major releases as pre-releases for the
# next LTS release.
if [[ $((NODE_MAJOR % 2)) -eq 0 ]];
  then NODE_PKG_MAJOR=${NODE_MAJOR};
  else NODE_PKG_MAJOR=$((NODE_MAJOR + 1));
fi

FEDORA_DEFAULT_RELEASE_LOW=$((NODE_PKG_MAJOR + 19))
FEDORA_DEFAULT_RELEASE_HIGH=$((NODE_PKG_MAJOR + 20))

if [[ $((NODE_PKG_MAJOR)) -eq 20 ]]; then
  RHEL_DEFAULT_RELEASE=&#34; || 0%{?rhel} == 10&#34;
fi

# Handle the situation where the next stable release of Node.js isn&#39;t yet
# available to include.
if [[ $((NODE_PKG_MAJOR)) -eq 20 ]]; then
  TEMPORARY_RELEASE=&#34; || 0%{?fedora} == 41 || 0%{?rhel} &gt;= 11&#34;
fi

rm -rf node-v${version}.tar.gz \
       node-v${version}-stripped.tar.gz \
       node-v${version}/ \
       wasi-sdk-* \
       cjs-module-lexer* \
       undici* \
       SHASUMS256.txt
echo Downloading node-v${version}.tar.gz
wget http://nodejs.org/dist/v${version}/node-v${version}.tar.gz \
     http://nodejs.org/dist/v${version}/SHASUMS256.txt
echo Validating sha256sum
sha256sum -c SHASUMS256.txt --ignore-missing
rm -f SHASUMS256.txt
tar -zxf node-v${version}.tar.gz

# Remove bundled OpenSSL
# We will link to the system version
rm -rf node-v${version}/deps/openssl
tar -zcf node-v${version}-stripped.tar.gz node-v${version}

# Record the bundled cjs-module-lexer version
LEXER_VERSION=$(jq -r &#39;.version&#39; node-v${version}/deps/cjs-module-lexer/package.json)

# Record the bundled undici version
UNDICI_VERSION=$(jq -r &#39;.version&#39; node-v${version}/deps/undici/src/package.json)

ICU_MAJOR=$(jq -r &#39;.[0].url&#39; node-v${version}/tools/icu/current_ver.dep | sed --expression=&#39;s/.*release-\([[:digit:]]\+\)-\([[:digit:]]\+\).*/\1/g&#39;)
ICU_MINOR=$(jq -r &#39;.[0].url&#39; node-v${version}/tools/icu/current_ver.dep | sed --expression=&#39;s/.*release-\([[:digit:]]\+\)-\([[:digit:]]\+\).*/\2/g&#39;)

# Download the ICU binary data files
rm -Rf icu4c-${ICU_MAJOR}_${ICU_MINOR}-data-bin-*.zip
wget $(grep Source3 packaging/nodejs.spec.j2 | sed --expression=&#34;s/.*http/http/g&#34; --expression=&#34;s/\(\%{icu_major}\)/${ICU_MAJOR}/g&#34; --expression=&#34;s/\(\%{icu_minor}\)/${ICU_MINOR}/g&#34;)
wget $(grep Source4 packaging/nodejs.spec.j2 | sed --expression=&#34;s/.*http/http/g&#34; --expression=&#34;s/\(\%{icu_major}\)/${ICU_MAJOR}/g&#34; --expression=&#34;s/\(\%{icu_minor}\)/${ICU_MINOR}/g&#34;)

rm -f node-v${version}.tar.gz

set +e

# Determine the bundled versions of the various packages
echo &#34;Included software versions&#34;
echo &#34;-------------------------&#34;
echo
echo &#34;Node.js version&#34;
echo &#34;=========================&#34;
echo &#34;${version}&#34;
echo
echo &#34;libnode shared object version&#34;
echo &#34;=========================&#34;
NODE_SOVERSION=$(grep -oP &#39;(?&lt;=#define NODE_MODULE_VERSION )\d+&#39; node-v${version}/src/node_version.h)
echo &#34;${NODE_SOVERSION}&#34;
echo
echo &#34;V8&#34;
echo &#34;=========================&#34;
V8_MAJOR=$(grep -oP &#39;(?&lt;=#define V8_MAJOR_VERSION )\d+&#39; node-v${version}/deps/v8/include/v8-version.h)
V8_MINOR=$(grep -oP &#39;(?&lt;=#define V8_MINOR_VERSION )\d+&#39; node-v${version}/deps/v8/include/v8-version.h)
V8_BUILD=$(grep -oP &#39;(?&lt;=#define V8_BUILD_NUMBER )\d+&#39; node-v${version}/deps/v8/include/v8-version.h)
V8_PATCH=$(grep -oP &#39;(?&lt;=#define V8_PATCH_LEVEL )\d+&#39; node-v${version}/deps/v8/include/v8-version.h)
echo &#34;${V8_MAJOR}.${V8_MINOR}.${V8_BUILD}.${V8_PATCH}&#34;
echo
echo &#34;c-ares&#34;
echo &#34;=========================&#34;
C_ARES_VERSION=$(grep -oP &#39;(?&lt;=#define ARES_VERSION_STR ).*\&#34;&#39; node-v${version}/deps/cares/include/ares_version.h |sed -e &#39;s/^&#34;//&#39; -e &#39;s/&#34;$//&#39;)
echo $C_ARES_VERSION
echo
echo &#34;llhttp&#34;
echo &#34;=========================&#34;
LLHTTP_MAJOR=$(grep -oP &#39;(?&lt;=#define LLHTTP_VERSION_MAJOR )\d+&#39; node-v${version}/deps/llhttp/include/llhttp.h)
LLHTTP_MINOR=$(grep -oP &#39;(?&lt;=#define LLHTTP_VERSION_MINOR )\d+&#39; node-v${version}/deps/llhttp/include/llhttp.h)
LLHTTP_PATCH=$(grep -oP &#39;(?&lt;=#define LLHTTP_VERSION_PATCH )\d+&#39; node-v${version}/deps/llhttp/include/llhttp.h)
LLHTTP_VERSION=&#34;${LLHTTP_MAJOR}.${LLHTTP_MINOR}.${LLHTTP_PATCH}&#34;
echo $LLHTTP_VERSION
echo
echo &#34;libuv&#34;
echo &#34;=========================&#34;
UV_MAJOR=$(grep -oP &#39;(?&lt;=#define UV_VERSION_MAJOR )\d+&#39; node-v${version}/deps/uv/include/uv/version.h)
UV_MINOR=$(grep -oP &#39;(?&lt;=#define UV_VERSION_MINOR )\d+&#39; node-v${version}/deps/uv/include/uv/version.h)
UV_PATCH=$(grep -oP &#39;(?&lt;=#define UV_VERSION_PATCH )\d+&#39; node-v${version}/deps/uv/include/uv/version.h)
LIBUV_VERSION=&#34;${UV_MAJOR}.${UV_MINOR}.${UV_PATCH}&#34;
echo $LIBUV_VERSION
echo
echo &#34;nghttp2&#34;
echo &#34;=========================&#34;
NGHTTP2_VERSION=$(grep -oP &#39;(?&lt;=#define NGHTTP2_VERSION ).*\&#34;&#39; node-v${version}/deps/nghttp2/lib/includes/nghttp2/nghttp2ver.h |sed -e &#39;s/^&#34;//&#39; -e &#39;s/&#34;$//&#39;)
echo $NGHTTP2_VERSION
echo
echo &#34;nghttp3&#34;
echo &#34;=========================&#34;
NGHTTP3_VERSION=$(grep -oP &#39;(?&lt;=#define NGHTTP3_VERSION ).*\&#34;&#39; node-v${version}/deps/ngtcp2/nghttp3/lib/includes/nghttp3/version.h |sed -e &#39;s/^&#34;//&#39; -e &#39;s/&#34;$//&#39;)
echo $NGHTTP3_VERSION
echo
echo &#34;ngtcp2&#34;
echo &#34;=========================&#34;
NGTCP2_VERSION=$(grep -oP &#39;(?&lt;=#define NGTCP2_VERSION ).*\&#34;&#39; node-v${version}/deps/ngtcp2/ngtcp2/lib/includes/ngtcp2/version.h |sed -e &#39;s/^&#34;//&#39; -e &#39;s/&#34;$//&#39;)
echo $NGTCP2_VERSION
echo
echo &#34;ICU&#34;
echo &#34;=========================&#34;
echo &#34;${ICU_MAJOR}.${ICU_MINOR}&#34;
echo
echo &#34;simdutf&#34;
echo &#34;=========================&#34;
SIMDUTF_VERSION=$(grep -oP &#39;(?&lt;=#define SIMDUTF_VERSION ).*\&#34;&#39; node-v${version}/deps/simdutf/simdutf.h |sed -e &#39;s/^&#34;//&#39; -e &#39;s/&#34;$//&#39;)
echo $SIMDUTF_VERSION
echo
echo &#34;punycode&#34;
echo &#34;=========================&#34;
PUNYCODE_VERSION=$(/usr/bin/node -e &#34;console.log(require(&#39;punycode&#39;).version)&#34;)
echo $PUNYCODE_VERSION
echo
echo &#34;uvwasi&#34;
echo &#34;=========================&#34;
UVWASI_MAJOR=$(grep -oP &#39;(?&lt;=#define UVWASI_VERSION_MAJOR )\d+&#39; node-v${version}/deps/uvwasi/include/uvwasi.h)
UVWASI_MINOR=$(grep -oP &#39;(?&lt;=#define UVWASI_VERSION_MINOR )\d+&#39; node-v${version}/deps/uvwasi/include/uvwasi.h)
UVWASI_PATCH=$(grep -oP &#39;(?&lt;=#define UVWASI_VERSION_PATCH )\d+&#39; node-v${version}/deps/uvwasi/include/uvwasi.h)
UVWASI_VERSION=&#34;${UVWASI_MAJOR}.${UVWASI_MINOR}.${UVWASI_PATCH}&#34;
echo $UVWASI_VERSION
echo
echo &#34;npm&#34;
echo &#34;=========================&#34;
NPM_VERSION=$(jq -r .version ./node-v${version}/deps/npm/package.json)
echo $NPM_VERSION
echo
echo &#34;zlib&#34;
echo &#34;=========================&#34;
ZLIB_VERSION=$(grep -oP &#39;(?&lt;=#define ZLIB_VERSION ).*\&#34;&#39; node-v${version}/deps/zlib/zlib.h |sed -e &#39;s/^&#34;//&#39; -e &#39;s/&#34;$//&#39;)
echo $ZLIB_VERSION
echo
echo &#34;cjs-module-lexer&#34;
echo &#34;=========================&#34;
echo &#34;${LEXER_VERSION}&#34;
echo
echo &#34;undici&#34;
echo &#34;=========================&#34;
echo &#34;${UNDICI_VERSION}&#34;
echo
echo &#34;ada&#34;
echo &#34;=========================&#34;
ADA_VERSION=$(grep -osP &#39;(?&lt;=#define ADA_VERSION ).*\&#34;&#39; node-v${version}/deps/ada/ada.h |sed -e &#39;s/^&#34;//&#39; -e &#39;s/&#34;$//&#39;)
ADA_VERSION=${ADA_VERSION:-0}
echo &#34;${ADA_VERSION}&#34;
echo
echo &#34;Applying versions to spec template&#34;

# Get the list of patches we need to add to the specfile
readarray -t patchlist &lt; &lt;(git ls-files |grep &#39;^[0-9]\{4\}-.*\.patch&#39;)
json_patchlist=$(jq --compact-output --null-input &#39;$ARGS.positional&#39; --args -- &#34;${patchlist[@]}&#34;)

IFS=&#39;&#39; read -r -d &#39;&#39; template_json &lt;&lt;EOF
{
    &#34;NODE_PKG_MAJOR&#34;: $NODE_PKG_MAJOR,
    &#34;NODE_MAJOR&#34;: $NODE_MAJOR,
    &#34;NODE_MINOR&#34;: $NODE_MINOR,
    &#34;NODE_PATCH&#34;: $NODE_PATCH,
    &#34;FEDORA_DEFAULT_RELEASE_LOW&#34;: $FEDORA_DEFAULT_RELEASE_LOW,
    &#34;FEDORA_DEFAULT_RELEASE_HIGH&#34;: $FEDORA_DEFAULT_RELEASE_HIGH,
    &#34;TEMPORARY_RELEASE&#34;: &#34;$TEMPORARY_RELEASE&#34;,
    &#34;RHEL_DEFAULT_RELEASE&#34;: &#34;$RHEL_DEFAULT_RELEASE&#34;,
    &#34;NODE_SOVERSION&#34;: $NODE_SOVERSION,
    &#34;V8_MAJOR&#34;: $V8_MAJOR,
    &#34;V8_MINOR&#34;: $V8_MINOR,
    &#34;V8_BUILD&#34;: $V8_BUILD,
    &#34;V8_PATCH&#34;: $V8_PATCH,
    &#34;C_ARES_VERSION&#34;: $C_ARES_VERSION,
    &#34;LLHTTP_VERSION&#34;: $LLHTTP_VERSION,
    &#34;LIBUV_VERSION&#34;: $LIBUV_VERSION,
    &#34;NGHTTP2_VERSION&#34;: $NGHTTP2_VERSION,
    &#34;NGHTTP3_VERSION&#34;: $NGHTTP3_VERSION,
    &#34;NGTCP2_VERSION&#34;: $NGTCP2_VERSION,
    &#34;ICU_MAJOR&#34;: $ICU_MAJOR,
    &#34;ICU_MINOR&#34;: $ICU_MINOR,
    &#34;SIMDUTF_VERSION&#34;: $SIMDUTF_VERSION,
    &#34;PUNYCODE_VERSION&#34;: $PUNYCODE_VERSION,
    &#34;UVWASI_VERSION&#34;: $UVWASI_VERSION,
    &#34;NPM_VERSION&#34;: $NPM_VERSION,
    &#34;ZLIB_VERSION&#34;: $ZLIB_VERSION,
    &#34;LEXER_VERSION&#34;: $LEXER_VERSION,
    &#34;UNDICI_VERSION&#34;: $UNDICI_VERSION,
    &#34;ADA_VERSION&#34;: $ADA_VERSION,
    &#34;PATCHES&#34;: $json_patchlist
}
EOF

echo ${template_json} | jinja2 ${SCRIPT_DIR}/packaging/nodejs.spec.j2 \
    &gt; ${SCRIPT_DIR}/nodejs${NODE_PKG_MAJOR}.spec

if [ $_arg_push = &#39;on&#39; ]; then
  fedpkg new-sources node-v${version}-stripped.tar.gz \
                     icu4c-${ICU_MAJOR}_${ICU_MINOR}-data-bin-*.zip
fi

rm -rf node-v${version}
# ] &lt;-- needed because of Argbash
</code></pre>
  </div>
 </div> <!-- end .card-->

</div>
</div>
<!-- /template: file.html -->
</div>
    </div>

        <div class="footer pt-4 text-white">
        <div class="container">
            <div class="d-flex align-items-center">
                <div>
                    <div>Powered by <a href="https://pagure.io/pagure" class="notblue">Pagure</a> 5.14.1</div>
                    <div>
                        <a href="https://docs.pagure.org/pagure/usage/index.html" class="notblue">Documentation</a> &bull;
                        <a href="https://pagure.io/pagure/new_issue" class="notblue">File an Issue</a> &bull;
                        <a href="/about">About this Instance</a> &bull;
                        <a href="/ssh_info" class="notblue">SSH Hostkey/Fingerprint</a>
                    </div>
                </div>
                <div class="ml-auto text-right">
                    <div>&copy; Red Hat, Inc. and others.</div>
                </div>
            </div>
        </div>
    </div>


    <script type="text/javascript" nonce="L2aEi5eAKYxWKh00jfb150S2u" src="/static/vendor/jquery/jquery.min.js?version=5.14.1"></script>

    <script src="/static/vendor/bootstrap/bootstrap.bundle.min.js?version=5.14.1"></script>

    <script type="text/javascript" nonce="L2aEi5eAKYxWKh00jfb150S2u">
      $('[data-toggle="tooltip"]').tooltip({placement : 'bottom'});
      $(".cancel_btn").click(function() {
        history.back();
      });
    </script>

<script type="text/javascript"  nonce="L2aEi5eAKYxWKh00jfb150S2u" src="/static/vendor/lazyload/lazyload.min.js?version=5.14.1"></script>

<script type="text/javascript" nonce="L2aEi5eAKYxWKh00jfb150S2u">
window.addEventListener("load", function(event) {
    lazyload();
});
</script>

<script type="text/javascript" nonce="L2aEi5eAKYxWKh00jfb150S2u">
$("#giturl-toggle").on('click', function(event){
  event.stopPropagation();
  $("#giturl-more").toggle();
  $("#giturl-toggle").hide();
})

$(".fork_project_btn").click(function() {
  $('#fork_project').submit();
});

$(".select-on-focus").on("focus", function() {
  $(this).select();
});

</script>

<script type="text/javascript" nonce="L2aEi5eAKYxWKh00jfb150S2u" src="/static/vendor/highlight.js/highlight.pack.js?version=5.14.1"></script>
<script type="text/javascript" nonce="L2aEi5eAKYxWKh00jfb150S2u" src="/static/vendor/highlightjs-line-numbers/highlightjs-line-numbers.min.js?version=5.14.1"></script>
<script type="text/javascript" nonce="L2aEi5eAKYxWKh00jfb150S2u" src="/static/vendor/highlight.js/spec.js?version=5.14.1"></script>

<script type="text/javascript" nonce="L2aEi5eAKYxWKh00jfb150S2u">
  $(document).ready(function() {
  $('.fork_project_btn').click($("[name=fork_project]").submit);

  $('pre.syntaxhighlightblock code').each(function(i, block) {
    hljs.highlightBlock(block);
    hljs.lineNumbersBlock(block);
  });

  var cls = "highlighted-line";
  var lines = location.hash.substr(2).split('-').map(function (x) { return parseInt(x, 10) });
  if (! isNaN(lines[0]))
  {
    for (var i = lines[lines.length - 1]; i >= lines[0]; i--) {
      $('#_' + i).parent().parent().addClass(cls);
    }
    setTimeout(function(){
      $("#_" + lines[0]).get(0).scrollIntoView({behavior: "instant", block: "start", inline: "nearest"});
    }, 50);
  }
});
</script>

<script type="text/javascript" nonce="L2aEi5eAKYxWKh00jfb150S2u">

  function updateHighlight() {
    var cls = "highlighted-line";
    $('.' + cls).removeClass(cls)
    if (location.hash !== '') {
      var lines = location.hash.substr(2).split('-').map(function (x) { return parseInt(x, 10) });
      for (var i = lines[lines.length - 1]; i >= lines[0]; i--) {
        $('[data-line-number=' + i + ']').closest('tr').addClass(cls);
      }
      return lines;
    }
    return [];
  }
  $(window).on('hashchange', updateHighlight);
  var selected = [];
  $("[data-line-number]").click(function (ev) {
    var line = $(this).attr('data-line-number');
    if (ev.shiftKey) {
      selected = selected.slice(-1).concat(line);
    } else {
      selected = [line];
    }

    var hash = '_' + selected[0];
    if (selected.length === 2) {
      hash = '_' + Math.min(selected[0], selected[1]) + '-' + Math.max(selected[0], selected[1]);
    }
    window.location.hash = hash;
    return false;
  });

</script>


</body>
</html>