Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions cmd/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ func (lr *listResult) print() {
}

func showComponentList(env *environment.Environment, opt listOptions) (*listResult, error) {
if !opt.installedOnly {
// Skip online update in packaged builds
if !opt.installedOnly && !environment.IsPackagedBuild {
err := env.V1Repository().UpdateComponentManifests()
if err != nil {
tui.ColorWarningMsg.Fprint(os.Stderr, "Warn: Update component manifest failed, err_msg=[", err.Error(), "]\n")
Expand Down Expand Up @@ -182,8 +183,16 @@ func showComponentList(env *environment.Environment, opt listOptions) (*listResu
}

func showComponentVersions(env *environment.Environment, component string, opt listOptions) (*listResult, error) {
versions, err := env.Profile().InstalledVersions(component)
if err != nil {
return nil, err
}
installed := set.NewStringSet(versions...)

var cmpTable [][]string
cmpTable = append(cmpTable, []string{"Version", "Installed", "Release", "Platforms"})

var comp *v1manifest.Component
var err error
if opt.installedOnly {
comp, err = env.V1Repository().LocalComponentManifest(component, false)
} else {
Expand All @@ -193,15 +202,6 @@ func showComponentVersions(env *environment.Environment, component string, opt l
return nil, errors.Annotate(err, "failed to fetch component")
}

versions, err := env.Profile().InstalledVersions(component)
if err != nil {
return nil, err
}
installed := set.NewStringSet(versions...)

var cmpTable [][]string
cmpTable = append(cmpTable, []string{"Version", "Installed", "Release", "Platforms"})

platforms := make(map[string][]string)
released := make(map[string]string)

Expand Down
6 changes: 4 additions & 2 deletions components/client/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"os/user"
"path"

"github.com/go-git/go-billy/v5/osfs"
ui "github.com/gizak/termui/v3"
"github.com/gizak/termui/v3/widgets"
"github.com/pingcap/tiup/pkg/environment"
Expand Down Expand Up @@ -95,11 +96,12 @@ func connect(target string) error {
if err != nil {
return fmt.Errorf("can't get current user: %s", err.Error())
}
l, err := rline.New(false, "", env.HistoryFile(u))
l, err := rline.New(false, false, false, "", env.HistoryFile(u))
if err != nil {
return fmt.Errorf("can't open history file: %s", err.Error())
}
h := handler.New(l, u, os.Getenv(localdata.EnvNameInstanceDataDir), true)
dataDir := os.Getenv(localdata.EnvNameInstanceDataDir)
h := handler.New(l, u, dataDir, osfs.New(dataDir), true)
if err = h.Open(context.TODO(), ep.dsn); err != nil {
return fmt.Errorf("can't open connection to %s: %s", ep.dsn, err.Error())
}
Expand Down
9 changes: 9 additions & 0 deletions debian/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
*.debhelper
*.log
*.substvars
/.debhelper/
/.build/
/debhelper-build-stamp
/files
/tiup/
!/vendor/
7 changes: 7 additions & 0 deletions debian/README.source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# README for Debian source package maintainers

The file root.json was manually fetched with:

curl -LO https://tiup-mirrors.pingcap.com/root.json

It will need to be updated if upstream signing keys change.
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tiup (1.16.3+20250909~e769cc5c) unstable; urgency=medium

* Initial native packaging

-- Otto Kekäläinen <otto@debian.org> Wed, 19 Mar 2025 23:31:49 +0000
11 changes: 11 additions & 0 deletions debian/ci/extra_repository.list
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# These packages are still in the NEW queue
# (https://ftp-master.debian.org/new.html) and not yet in Debian. Meanwhile, get
# them from a the PPA they were uploaded to in parallel to the official Debian
# upload.
# - golang-github-asaskevich-eventbus
# - golang-github-dchest-bcrypt-pbkdf
# - golang-github-gohxs-readline
# - golang-github-jeremywohl-flatten
# - golang-github-lorenzosaino-go-sysctl
# - golang-github-pingcap-kvproto
deb [trusted=yes] https://ppa.launchpadcontent.net/otto/tidb/ubuntu questing main
96 changes: 96 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
Source: tiup
Section: golang
Priority: optional
Maintainer: Debian Go Packaging Team <team+pkg-go@tracker.debian.org>
Uploaders:
Otto Kekäläinen <otto@debian.org>,
Build-Depends:
debhelper-compat (= 13),
dh-golang,
dh-sequence-golang,
golang-any,
golang-etcd-server-dev,
golang-github-alecthomas-chroma-dev,
golang-github-appleboy-easyssh-proxy-dev,
golang-github-asaskevich-eventbus-dev,
golang-github-astroprofundis-sysinfo-dev,
golang-github-cavaliergopher-grab-dev,
golang-github-cheggaaa-pb.v3-dev,
golang-github-creasty-defaults-dev,
golang-github-dchest-bcrypt-pbkdf-dev,
golang-github-docker-go-units-dev,
golang-github-fatih-color-dev,
golang-github-gibson042-canonicaljson-go-dev,
golang-github-gizak-termui-dev,
golang-github-go-git-go-billy-dev,
golang-github-go-sql-driver-mysql-dev,
golang-github-gofrs-flock-dev,
golang-github-gohxs-readline-dev,
golang-github-golang-protobuf-1-5-dev,
golang-github-google-shlex-dev,
golang-github-google-uuid-dev,
golang-github-gorilla-mux-dev,
golang-github-jedib0t-go-pretty-dev,
golang-github-jeremywohl-flatten-dev,
golang-github-joomcode-errorx-dev,
golang-github-lorenzosaino-go-sysctl-dev,
golang-github-mattn-go-runewidth-dev,
golang-github-mattn-go-sixel-dev,
golang-github-minio-minio-go-v7-dev,
golang-github-mitchellh-colorstring-dev,
golang-github-pingcap-errors-dev,
golang-github-pingcap-failpoint-dev,
golang-github-pingcap-fn-dev,
golang-github-pingcap-kvproto-dev,
golang-github-pkg-errors-dev,
golang-github-prometheus-client-model-dev,
golang-github-prometheus-common-dev,
golang-github-prometheus-prom2json-dev,
golang-github-r3labs-diff-dev,
golang-github-relex-aini-dev,
golang-github-scaleft-sshkeys-dev,
golang-github-sergi-go-diff-dev,
golang-github-sethvargo-go-password-dev,
golang-github-shirou-gopsutil-dev,
golang-github-spf13-cobra-dev,
golang-github-spf13-pflag-dev,
golang-github-stretchr-testify-dev,
golang-github-vishvananda-netlink-dev,
golang-github-xo-dburl-dev,
golang-github-xo-tblfmt-dev,
golang-github-xo-terminfo-dev,
golang-github-xo-usql-dev,
golang-go.uber-atomic-dev,
golang-go.uber-zap-dev,
golang-golang-x-crypto-dev,
golang-golang-x-mod-dev,
golang-golang-x-sync-dev,
golang-golang-x-sys-dev,
golang-golang-x-term-dev,
golang-google-grpc-dev,
golang-gopkg-ini.v1-dev,
golang-gopkg-vmihailenco-msgpack.v2-dev,
golang-gopkg-yaml.v3-dev,
golang-sslmate-src-go-pkcs12-dev,
golang-toml-dev,
Testsuite: autopkgtest-pkg-go
Standards-Version: 4.7.2
Vcs-Browser: https://salsa.debian.org/go-team/packages/tiup
Vcs-Git: https://salsa.debian.org/go-team/packages/tiup.git
Homepage: https://github.com/pingcap/tiup
XS-Go-Import-Path: github.com/pingcap/tiup

Package: tiup
Section: utils
Architecture: any
Depends:
${misc:Depends},
${shlibs:Depends},
Static-Built-Using:
${misc:Static-Built-Using},
Description: Component manager for TiDB
TiUP is a tool designed to manage TiDB components, providing an easy way to
install, update, and maintain various components of the TiDB ecosystem. It
simplifies the process of setting up and managing TiDB clusters, making it
accessible for both developers and administrators. With TiUP, you can quickly
deploy and scale TiDB clusters, ensuring high availability and performance.
60 changes: 60 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Source: https://github.com/pingcap/tiup
Upstream-Name: PingCAP
Upstream-Contact: https://github.com/pingcap/tiup/issues

Files: *
Copyright: 2020-2025 PingCAP
License: Apache-2.0

Files: debian/*
Copyright:
2025 Otto Kekäläinen <otto@debian.org>
License: Apache-2.0
Comment: Debian packaging is licensed under the same terms as upstream

Files: debian/vendor/github.com/zaf/temp/*
Copyright: 2012 The Go Authors, 2017 Lefteris Zafiris
License: BSD-3-Clause

License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comment:
On Debian systems, the complete text of the Apache version 2.0 license
can be found in "/usr/share/common-licenses/Apache-2.0".

License: BSD-3-Clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
.
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21 changes: 21 additions & 0 deletions debian/gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This is a template from
# https://salsa.debian.org/salsa-ci-team/pipeline/-/raw/master/recipes/salsa-ci.yml
#
# If this pipeline is not running at after committing and pushing this file,
# ensure that https://salsa.debian.org/%{project_path}/-/settings/ci_cd has in
# field "CI/CD configuration file" filename "debian/salsa-ci.yml", the filename
# is the same as of this file, and duplicate files with similar contents but
# different filenames have been cleaned away.
#
# Feel free disable and enable tests to find a good balance between extensive
# coverage and having a consistently green pipeline where failures are rare
# enough that they are always investigated and addressed. For documentation
# please read https://salsa.debian.org/salsa-ci-team/pipeline
---
include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml

# @TODO: Remove this before finalizing MR and uploading
variables:
SALSA_CI_EXTRA_REPOSITORY: debian/ci/extra_repository.list
SALSA_CI_DISABLE_REPROTEST: 1
2 changes: 2 additions & 0 deletions debian/lrc.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Use license name and identified 'MIT* instead of 'Expat'
--spdx
1 change: 1 addition & 0 deletions debian/root.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"signatures":[{"keyid":"a61b695e2b86097d993e94e99fd15ec6d8fc8e9522948c9ff21c2f2c881093ae","sig":"jDFZCtE+VfJtpXJk5m5/TwIOpvkJe08+HWKCfPAhERKlqrGPAAdgLnXqftzZhcmDSR3uP2qxwqAZSO/ZUrWsie7XT5Xutva9SL//UXIk2N7RwS/PjN4AcaJydm4+V37h/sowlFz3nxeKobj21wpUAw/KxcY7mqu+XhLiPM2f5yhuGBC6MeoqBN5tlqCGoadHkGYibqXNS/1aBAtk/vCrCv86PRL3yzpfpKUB3ElyJJaQR2zUr5bqPNen31/qM2xxGp/amN7UxXddtAPGfZ2CNI959puyoTXwRULXS8J74BM8Lg7TAkDr+n9hkjmXi3MNhulPb5luPJ/eGQYw9l/vnw=="},{"keyid":"b128ee6a42e2665bd45aa2fa4a7b6e098cfedb3911154f300634b2c056214b9e","sig":"sa9m4ftMfe9PsnLA2pgUsTdv48tyJlSo2g0NYAnGBt81P5Ky+dYdWoplsJIgsvgF5rjd1JDt6eybh/ozlWKvyAG+ge8yWQkiaBMVofSTVpm1OovuLQ015NP78lfVSqUb4MaFBgfoqChszAk7Kx/av0DymLSiN7qhFsxf68naau9R83Ao2RSTc8QxJeTqoiJvgVRc9ILHoaVjhqEixGfcLPUKG3gLEyYglZSk3F1ixIa29/QHj2B7ICzS4Hceyk1RKKIUCcX3zF+eh29tZdGU7sZPnKlt2svzAfy1xiMUJikugQBucvvFox/txU2Tp2+rP3qgP6poZ/j1uxI9JaDaUQ=="},{"keyid":"9b3cea98f6f23cc11813b12d0526a1b6cfb3761008f0882c9caa8db742d63002","sig":"Bsn2hbGAZH9kpEJx5za7XMdtJI/QSlKDy00JDo8/Jdnjqp1AVMhKbbl6KedNHfwb5OPmohJzT6ukASUqTzCcMPjJAZCKPJWDS9vrrtc9Nqvdfn2kIYj41pLNOdFBiKa79x6Rio+jLdL81Nt8T0d/izMfGO2vJ+LkZElUGG8VDj19UWRKKZPp/V3oFBfGIRemJWbDBsTt9cVwNa9ed3OXS01qS4/asrd9l19BQ+tZfZ+dXzDuMlv1THJNWB5UAdv0Ku7lSeV87oGOVMD4gkfdWAzFioT+hwXF8f3JUobNskyZIJTMqNPHST+ACJgQjgLH0FkN8xjw+YYv/ktgoZrSIA=="},{"keyid":"2001b18089c9a865cebee793dbc23f9b1f5ce457f96b8d0b2c0909c26b00c643","sig":"Ca+w4Cf7avansD74a014IUJBobcCz+X8aIbmWma9Ch8Ccdksedgf6MEWi0fHUJXloLauLP/I56PzhzfvB+0+YgO9lMkECkEcjed2NC0YCuRDZ07q8ndsZPQ94KKg7BWXo+1xXkDz5W7AKpFYdxYnAWfVSpvc/iceTd3bX+3vz4bs/FiyZtFig6rTWdS+gKrGTqFJ//AOP+9iC3kheSEZXlXV2HS0EB8s461PqSpdMLcXBughRSIzbFHPid+5Nch0zJzCIuLXjZE7n2w1M+9j5eyF9USga5cjQiXIJ0LTINSzFkPjuUk3PzWYkNobGr9fxlrePzUHlzFEGHz8kxG0gQ=="},{"keyid":"545c31fd615bbaa4c5424509a9305eb280e019996b043a576dc12b758aa0890a","sig":"ftsm8N54OgIHhFrIKDnCrocY+rxCzZBgjyX37Ixm2vJifk3RhXA2cUEQepqFcRKH1oEmt90lzV6VWqy1EUUzYJSGA6edq2tix6nntcRgDJkIqCAPViBgaR1OCKFhf/2ldRvnjtuOkG6h+5qAmuAB51DdDHGjHW+DKvxflTK7p59cSZLvmJImPWYTz2qF1U+IKMSb7glYVqXUsFKUq5GP7gawE8Ez/2N0bMkD9s6GPtErCGxIkH2x1/5eYLVlbdGwy/PsW1/cE2uRAGCsPC6NknlWXYHFXYVgJWJ16H9H7Ih2NfkizBOwhWkVr+VPLkXllo9HutxSkNl2dEk4rAzzDQ=="}],"signed":{"_type":"root","expires":"2022-05-26T11:18:30+08:00","roles":{"index":{"keys":{"7fce7ec4f9c36d51dec7ec96065bb64958b743e46ea8141da668cd2ce58a9e61":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAn5kVA7MlBfSe7EBaExjl\nKbwoDkn1aYi74s29mFgtRo8nejbrVvZQMCIUhvKc0pFa/l9JD/QY6/nAOCE1lpzi\nwwNkSntfOo3p3HQIR+Ut7hZ4Sxfe/5JagGo3LQ+Hd3EJWUxyEfQ/Bff07F3XAbqM\n5+cKNrdsKWZJcPiJDW621qGwCx52f+gzl9bnFe4/hx34OUgirwqh5DS+LhIO+/yt\nbOiN1AyjQKlnb8lUnblElS4Njd+F4io5VzSrZYi2+4AbTkO6wLwbsWHMzXfv9qwn\nvllufOHpB6EwiQ/xBOMuvJJymHnZvs8AH4SuydQIXLaJuv1ysFaBs0KB/ktbakSK\nLwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/index.json"},"root":{"keys":{"2001b18089c9a865cebee793dbc23f9b1f5ce457f96b8d0b2c0909c26b00c643":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1LB2sQGelCEaKTKPzdim\n5V0RrdDOyZTSsZlWjzqZQn7lIRKG9Yjah//ReBdy3gmTwbZWUYzGFeclS+1+H05f\nvvxJUN1ttNgy6xsKql6s1ZhdwoBLbkjTqHjbRRQ2+fMJQdhusb1TXEP5Vut2jlyo\nSoGSa9mDC0VbGW9Xs/4HqfyH6m4dV6GeFYwDUX0ok6l6DHk28UIFyieKITFNkrKv\n5xoUPS3P49tX7wprXiFBKiP1Tr72O+GSTBFXuUhPASBVCXoxj7g5fB024P464ku/\nTHECfX1F5q7htz2zkgn7V9A9kedASwoqbrC5glHXfrfiQOctHkyKaGLswWe+8OAp\n5wIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"545c31fd615bbaa4c5424509a9305eb280e019996b043a576dc12b758aa0890a":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxzlxJStPfdjMERTUs2GH\nMKMPAflgMTId3rhKsyLGAoRraAE3+crZEkXz+sEgCSW7590qDofcZYFeS9QOebD2\nI1/PYbDqMOwWkRSta6BRJyhgGKmG8QuxiYQQEQSgBhTQap3jnxiduXiZ+6uTiNkS\n44/Z12GN+vXLDLCVBlxFZx2Am9QFVCyP7f9Dxj0EkaVKRGu6+utjaWGyQLq5splk\nNbFvMLYJLkzrk8dzLwr1E85NRCAVLnRJR4fYllglJmJi6laHdOgXf9GOL1vQ/qUh\nRXqYkGiZ/15vurMMyUaIdzLY95XHw6vsjOwV9kBs8z/cxBVLxpNWUiOBsfDpmBc3\nCwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"9b3cea98f6f23cc11813b12d0526a1b6cfb3761008f0882c9caa8db742d63002":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsOgQkwLOh31QV9OpbO9v\n6o83durJFGPOnVXZiab83pKaSk7HEK9WzXBq0BaPvtFwSfROVdpgtopri5lZi+uH\naMKLUn5F8XRnSMl/7m5vM4XpZZYa4aQId4TWdbFtTu31eHGZ3eEC5nDRJ5NhZOJd\nKLFBu/xmxrh/eNZt4QbdWLZayjHnzyoy5AnfNTR6nJgPAv+rBOqyqT/r14q4Pngh\n3z0I3pNFr5qmxsp013XV+kgOW1F7zT7IMU8xRIgo85UWUNhax0/bjY/2NI1Z+WjR\nyhZmUBMVYWvfw97xDUrvBvrJxZPgg0lGvxJC6LF2dM7wgLaNx9khT6HMBVxjxLMs\nDQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"a61b695e2b86097d993e94e99fd15ec6d8fc8e9522948c9ff21c2f2c881093ae":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnayxhw6KeoKK+Ax9RW6v\n66YjrpRpGLewLmSSAzJGX8nL5/a2nEbXbeF9po265KcBSFWol8jLBsmG56ruwwxp\noWWhJPncqGqy8wMeRMmTf7ATGa+tk+To7UAQD0MYzt7rRlIdpqi9Us3J6076Z83k\n2sxFnX9sVflhOsotGWL7hmrn/CJWxKsO6OVCoqbIlnJV8xFazE2eCfaDTIEEEgnh\nLIGDsmv1AN8ImUIn/hyKcm1PfhDZrF5qhEVhfz5D8aX3cUcEJw8BvCaNloXyHf+y\nDKjqO/dJ7YFWVt7nPqOvaEkBQGMd54ETJ/BbO9r3WTsjXKleoPovBSQ/oOxApypb\nNQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"},"b128ee6a42e2665bd45aa2fa4a7b6e098cfedb3911154f300634b2c056214b9e":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0kgU3v3SxYzm5J6P+GPP\nmy6toBnKYtTViAVmpUJiIEjdZ9NLpoJU0na9q0CD8sIgo2Js/W/owJUvSj6rm8us\nsu/Ve5KsoJN6zca2am1uZ5IKnc48i0mCv76WXawCxM+NFGqSCMJcltlhj3fC/GDS\ngu+BiIbrgR1PgJf6Jk6l7uMJdN3TL6JJQcEC4lz+2hj5zoVNYkq06ZC79j2tPDCI\nkTAYGF/TAAVLH08/kGH5ZeRPlVKJ7cwW3OniLM5NeFnS8+shRNb6AYr7xju3Ikbw\nDo14ipIghBI0iAxn6Lvr/iilc7TM7RWJ4OiTrmK3SQSJ+U6H2N2/I5OGEHBEKzbA\nOQIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":3,"url":"/root.json"},"snapshot":{"keys":{"8660a9f40687fb33e6f8ad563f21ee81b9ce7b91c90827cc7ae2416c5e0e94e9":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqTZx29eJR5EumjqM4YTb\nFlKbim1GNYmtbCLH51BbU2lt46ddmfGvtGsxTD3mIZ/GEHVFv6Aei3xx5nIfhGP0\nrG78JRz394uU8Pd62DiIFWYizr5o+ZBZu29D2YK5ZtxoLFpgt0ibnINK2NcesDC8\nSqfIUbMiQFT6yB/MYD275SjfRGHOeYTPmKdjMJrhLL2cfIPYnQ0QFYIyMvXBG1Fj\nU0rc9UclYQHh9YheIDVYI9YCo/DWP3KFfRJpoTjQRGoPSK9TXcpCAEzQpEG3jOek\n9PdV9Ol6/O8JbrFwXWF3LhkUThg+zCjV4qHtP4oqp5QCqzTQTXGQ9qxWUSlHi4Eu\nIwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/snapshot.json"},"timestamp":{"keys":{"66d4ea1da00076c822a6e1b4df5eb1e529eb38f6edcedff323e62f2bfe3eaddd":{"keytype":"rsa","keyval":{"public":"-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzTgV5iKhMnunUDxt4PB\npYqTMPaJN/ZdOOsP6cS3DeCE/EcYGfgCjvP7KD3gjG98VDBTVcuwZClSy+/zvHhV\nIq7VWu+yxQL5c6oa1xpCyHoA96JiLIDPhmqEdscdRybcRQ2CYywzKA8jSwEQCnEK\nc8a74ceY352l/MEcOem0+AtKrOjqcjbXCayDwC9yTg/c78bkp+4T8AhSWgt6Tlrt\nY8jLE7zwojFtIYtMwobWRIW2O3nJDXiSBbTPG3M9kF1G43INshSdBcuq5Tmy8lpE\n/XiG/E7+hP63Hm+KAcdvl553Zs7pLhAZxV0kqlApqRRwhscw+JQci8sVONun5t9t\nNwIDAQAB\n-----END PUBLIC KEY-----\n"},"scheme":"rsassa-pss-sha256"}},"threshold":1,"url":"/timestamp.json"}},"spec_version":"0.1.0","version":2}}
31 changes: 31 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/make -f

export DH_VERBOSE = 1

# Generic hardening of binaries
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

export DH_GOLANG_INSTALL_EXTRA := embed/examples/ embed/templates/

# Extend GOPATH to include the vendor directory from usql package
export GOPATH := $(CURDIR)/debian/.build/upstream:/usr/share/gocode/src/github.com/xo/usql/vendor

# @TODO: Ideally all dependencies would be Debian packages and this source
# package would not need to vend any of its dependencies like this
execute_before_dh_auto_configure:
cp -av debian/vendor ./

execute_after_dh_clean:
rm -rfv vendor/

override_dh_auto_test:
@echo "Skipping post-build Go tests because of too many failures"

override_dh_auto_install:
dh_auto_install -- --no-source
(cd debian/tiup/usr/bin/ && for x in *; do mv $$x tiup-$$x; done; mv tiup-tiup tiup)

%:
dh $@ --builddirectory=debian/.build/upstream --buildsystem=golang
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (native)
1 change: 1 addition & 0 deletions debian/tiup.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debian/root.json usr/share/tiup/
Loading
Loading