VirtualBox

source: vbox/trunk/src/VBox/Installer/linux/debian/rules@ 91699

Last change on this file since 91699 was 91699, checked in by vboxsync, 4 years ago

debian/rules: More un-breaking the debian package building, by remembering the VirtualBox source code location across the make invocation changing the current directory to the out directory as needed by the debhelper utilities. The normal logic for finding the source code location from $PWD cannot work any more.

  • Property svn:eol-style set to LF
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 16.5 KB
Line 
1#!/usr/bin/make -f
2# $Id: rules 91699 2021-10-12 18:43:45Z vboxsync $
3## @file
4# VirtualBox rules.
5#
6
7#
8# Copyright (C) 2006-2020 Oracle Corporation
9#
10# This file is part of VirtualBox Open Source Edition (OSE), as
11# available from http://www.virtualbox.org. This file is free software;
12# you can redistribute it and/or modify it under the terms of the GNU
13# General Public License (GPL) as published by the Free Software
14# Foundation, in version 2 as it comes in the "COPYING" file of the
15# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
17#
18
19#
20# NOTE: if you make changes to this file, please check if the updates should
21# be also applied to the publicly visible debian/rules file.
22#
23
24#export DH_VERBOSE=1
25
26# possible overrides:
27# OSE=1 force VBOX_OSE
28# NOPARALLEL=1 compile with -j1
29# LINUX=<dir> compile vboxdrv against Linux found in <dir>
30# VERBOSE=1 verbose build
31# DEBUG=1 debug build
32# NOSUBVER=1 disable generation of the sub-version field (which is
33# either the subversion rev [if available] or the build date)
34# NODOCS=1 don't build docs, use precompiled UserManual*.pdf and
35# maybe UserManual*.qch and UserManual*.qhc from $(vboxroot)/prebuild
36# NOMODS=1 don't build any module
37# NOQT=1 don't build the Qt GUI
38# NOSDL=1 don't build VBoxSDL
39# EFI=1 include the EFI binary from prebuild
40# VERSUFFIX=<suffix> set a particular package version suffix (e.g. _customer)
41# HEADLESS=1 build the headless version
42# VNC=1 build VNC code
43# NOWEBSVC=1 don't build the webservice API
44# STAGEDISO=<path> don't build the VBoxAdditions, use the precompiled .iso
45# PKGDIR=<path> where to store the final package(s)
46# svn_revision=xxx do not depend on subversion being available, but use this
47# hard-coded revision number instead
48#
49# NODOCS will be set if UserManual*.pdf, UserManual*.qch and UserManual*.qhc are
50# placed in $(vboxroot)/prebuild.
51# STAGEDISO will be set if VBoxGuestAdditions.iso is placed there.
52#
53# Wine will not be required if STAGEDISO is set.
54
55package := virtualbox
56verpkg := virtualbox-6.1
57vboxroot := $(shell while ! test -r configure && ! test "$$PWD" = "/"; do cd ..; done; pwd)
58debroot := $(vboxroot)/src/VBox/Installer/linux
59instlin := $(vboxroot)/src/VBox/Installer/linux
60pkgdir := $(if $(PKGDIR),$(PKGDIR),$(shell cd $(vboxroot)/..; pwd))
61outdir := $(if $(PATH_OUT_BASE),$(PATH_OUT_BASE),$(vboxroot))/out
62bldbase := $(outdir)/debian
63builddir := $(bldbase)/builddir
64moddir := $(bldbase)/modules
65prefix := $(bldbase)/$(verpkg)
66arch := $(shell dpkg --print-architecture)
67verfile := $(builddir)/version-generated.mk
68ose := $(if $(OSE),1,$(if $(wildcard $(vboxroot)/src/VBox/RDP/server),,1))
69chrarch := $(shell if [ `uname -m` = "x86_64" ]; then echo "amd64"; else echo "x86"; fi)
70-include $(vboxroot)/SVN_REVISION
71
72NOMODS ?= $(ose)
73NOQT ?= $(HEADLESS)
74NOSDL ?= $(HEADLESS)
75NOWEBSVC ?=
76EFI ?= $(if $(wildcard $(vboxroot)/prebuild/VBoxEFI32.fd $(vboxroot)/prebuild/VBoxEFI64.fd),1,)
77NODOCS ?= $(if $(wildcard $(addprefix $(vboxroot)/prebuild/,UserManual*.pdf UserManual*.qch UserManual*.qhc)),1,)
78STAGEDISO ?= $(if $(wildcard $(vboxroot)/prebuild/VBoxGuestAdditions.iso),$(vboxroot)/prebuild,)
79NOWINE := $(if $(STAGEDISO),1,$(ose))
80PYTHON := $(firstword $(shell which python3) $(shell which python))
81
82DEBPKGFILES := changelog compat control dirs postinst postrm preinst prerm rules templates
83
84ifneq ($(STAGEDISO),)
85 ifeq ($(wildcard $(STAGEDISO)/VBoxGuestAdditions.iso),)
86 $(error STAGEDISO='$(STAGEDISO)/VBoxGuestAdditions.iso' not found)
87 endif
88endif
89
90# Replicate debian package buildfiles to $(bldbase)
91ifneq ($(shell pwd),$(outdir))
92cmd := $(filter-out all Makefile,$(MAKECMDGOALS))
93all:
94 mkdir -p $(bldbase)
95 ln -sf $(addprefix $(debroot)/debian/,$(DEBPKGFILES)) $(bldbase)
96 +$(MAKE) -C $(outdir) vboxroot=$(vboxroot) -f debian/rules $(cmd)
97
98Makefile:
99
100$(cmd): all
101
102.PHONY: all $(MAKECMDGOALS)
103
104else
105 ifneq ($(wildcard $(verfile)),)
106include $(verfile)
107ver := $(VBOX_VERSION_STRING)
108svnver := $(if $(NOSUBVER),,$(if $(svn_revision),-$(svn_revision),$(shell if \
109 svn info $(vboxroot) > /dev/null 2>&1; then \
110 svn info $(vboxroot)|sed -e "s/^Revision: \(.*\)/-\1/;t;d"; else \
111 date +"-%Y%m%d"; fi)))
112debver := $(subst _ALPHA,~alpha,$(subst _BETA,~beta,$(subst _RC,~rc,$(subst _OSE,~ose,$(ver)))))$(svnver)$(VERSUFFIX)$(if $(HEADLESS),~headless,)$(if $(DEBUG),~dbg,)
113archdir := $(prefix)/opt/VirtualBox-$(ver)
114 endif
115
116
117ifneq ($(MAKECMDGOALS),clean)
118 debrel := $(if $(shell which lsb_release),_$(shell lsb_release -si)_$(shell lsb_release -sc),unknown)
119 debdist := $(strip $(shell grep $(debrel) $(debroot)/distributions_deb | cut -d'=' -f2))
120 ifeq ($(debdist),)
121 debdist := $(if $(shell which lsb_release),_$(shell lsb_release -si | tr a-z A-Z)_$(shell lsb_release -sr | sed -e 's/\./_/g' -e 's/\([^_]*\)\(_[^_]*\).*/\1\2/'),unknown)
122 # $(error package distribution not detected (debrel=$(debrel)))
123 endif
124endif
125
126cfg_flags := $(if $(NOQT),--disable-qt,) \
127 $(if $(NOSDL),--disable-vboxsdl,) \
128 $(if $(ose),--ose,) $(if $(LINUX),--with-linux=$(LINUX),) \
129 $(if $(HEADLESS),--build-headless,) \
130 $(if $(DEBUG),--build-debug,) \
131 $(if $(NOWINE),,--setup-wine) \
132 $(if $(VNC),--enable-vnc,) \
133 $(if $(PATH_OUT_BASE),--out-base-dir=$(PATH_OUT_BASE),) \
134 --disable-extpack
135
136bld_flags := AUTOCFG=$(bldbase)/AutoConfig.kmk \
137 LOCALCFG=$(debroot)/debian/LocalConfig.kmk \
138 PATH_OUT=$(builddir) \
139 VBOX_WITHOUT_EXTPACK_PUEL_PACKING=1 \
140 VBOX_WITHOUT_EXTPACK_VNC_PACKING=1 \
141 VBOX_WITH_VMSVGA3D=1 \
142 VBOX_DO_STRIP= \
143 VBOX_PATH_PACKAGE_DOCS="\"/usr/share/doc/$(verpkg)\"" \
144 VBOX_PACKAGE_DIST=$(debdist) \
145 $(if $(svn_revision),VBOX_SVN_REV=$(svn_revision),) \
146 $(if $(NODOCS),VBOX_WITH_DOCS=,) \
147 $(if $(VERBOSE),--print-directory KBUILD_VERBOSE=2,--no-print-directory) \
148 $(if $(STAGEDISO),VBOX_WITHOUT_ADDITIONS=1,)
149
150configure: $(bldbase)/configure-stamp
151$(bldbase)/configure-stamp:
152 dh_testdir
153 mkdir -p $(bldbase)
154 cd $(vboxroot) && ./configure --odir=$(bldbase) $(cfg_flags)
155 touch $@
156
157build: $(bldbase)/configure-stamp $(bldbase)/build-stamp
158$(bldbase)/build-stamp $(verfile): $(bldbase)/configure-stamp
159 dh_testdir
160 . $(bldbase)/env.sh && kmk -C $(vboxroot) $(bld_flags) $(if $(NOPARALLEL),-j1,) all
161 # Files from prebuild go to (builddir)/bin to be used during the
162 # packing stage, overriding what the build did/would produce.
163 $(if $(NODOCS),cp $(addprefix $(vboxroot)/prebuild/,UserManual*.pdf UserManual*.qch UserManual*.qhc) $(builddir)/bin,)
164 $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI32.fd $(builddir)/bin,)
165 $(if $(EFI),cp $(vboxroot)/prebuild/VBoxEFI64.fd $(builddir)/bin,)
166 mkdir -p $(builddir)/bin/additions
167 $(if $(STAGEDISO),cp $(STAGEDISO)/VBoxGuestAdditions.iso $(builddir)/bin/additions,)
168 . $(bldbase)/env.sh && kmk -C $(vboxroot) $(bld_flags) \
169 VBOX_NO_LINUX_RUN_INSTALLER=1 \
170 VBOX_LNX_ADD_ARCHIVE.x86=$(builddir)/bin/additions/VBoxGuestAdditions-x86.tar.bz2 \
171 VBOX_LNX_ADD_ARCHIVE.amd64=$(builddir)/bin/additions/VBoxGuestAdditions-amd64.tar.bz2 \
172 VBOX_PATH_ADDITIONS.linux.x86=$(builddir)/bin/additions \
173 VBOX_PATH_ADDITIONS.linux.amd64=$(builddir)/bin/additions \
174 packing
175 touch $(bldbase)/build-stamp
176
177# Build modules for every kernel we find in /lib/modules/*
178$(bldbase)/modules-stamp: $(bldbase)/build-stamp
179 rm -rf $(moddir)
180 mkdir $(moddir)
181 for d in $(wildcard /lib/modules/*); do \
182 if [ -L $$d/build ]; then \
183 make -C $(builddir)/bin/src/vboxdrv KERN_VER=$$(basename $$d) clean && \
184 make -j4 -C $(builddir)/bin/src/vboxdrv KBUILD_VERBOSE= KERN_VER=$$(basename $$d) all; \
185 make -C $(builddir)/bin/src/vboxnetflt KERN_VER=$$(basename $$d) clean && \
186 (cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxnetflt || true) && \
187 make -j4 -C $(builddir)/bin/src/vboxnetflt KBUILD_VERBOSE= KERN_VER=$$(basename $$d) KBUILD_EXTRA_SYMBOLS=$(builddir)/bin/src/vboxnetflt/Module.symvers all; \
188 make -C $(builddir)/bin/src/vboxnetadp KERN_VER=$$(basename $$d) clean && \
189 (cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxnetadp || true) && \
190 make -j4 -C $(builddir)/bin/src/vboxnetadp KBUILD_VERBOSE= KERN_VER=$$(basename $$d) KBUILD_EXTRA_SYMBOLS=$(builddir)/bin/src/vboxnetadp/Module.symvers all; \
191 make -C $(builddir)/bin/src/vboxpci KERN_VER=$$(basename $$d) clean && \
192 (cp $(builddir)/bin/src/vboxdrv/Module.symvers $(builddir)/bin/src/vboxpci || true) && \
193 make -j4 -C $(builddir)/bin/src/vboxpci KBUILD_VERBOSE= KERN_VER=$$(basename $$d) KBUILD_EXTRA_SYMBOLS=$(builddir)/bin/src/vboxpci/Module.symvers all; \
194 make -C $(builddir)/bin/src/vboxpci KERN_VER=$$(basename $$d) clean; true; \
195 fi; \
196 done
197 touch $@
198
199clean:
200 dh_testdir
201 dh_testroot
202 dh_clean
203 rm -rf $(archdir)
204 rm -rf $(builddir)
205 rm -rf $(moddir)
206 rm -rf $(bldbase)/wine.*
207 rm -rf $(bldbase)/VirtualBox-*
208 rm -f $(bldbase)/VirtualBox.tar $(bldbase)/VirtualBox.tar.bz2
209 rm -f $(bldbase)/virtualbox-*.substvars $(bldbase)/virtualbox*.debhelper
210 rm -f $(bldbase)/$(verpkg).mime $(bldbase)/$(verpkg).sharedmimeinfo
211 rm -f $(bldbase)/modules-stamp $(bldbase)/build-stamp $(bldbase)/configure-stamp
212 rm -f $(bldbase)/AutoConfig.kmk $(bldbase)/configure.log $(bldbase)/env.sh
213 rm -f $(addprefix $(bldbase)/,$(DEBPKGFILES))
214 if [ -d $(bldbase) ]; then rmdir $(bldbase); fi
215
216 ifeq ($(VBOX_VERSION_MAJOR),)
217binary: build $(verfile)
218 +$(MAKE) -f debian/rules binary
219
220 else
221# Build architecture-dependent files here.
222binary: build $(if $(NOMODS),,$(bldbase)/modules-stamp)
223 dh_testdir
224 dh_testroot
225 dh_prep
226 dh_installdirs
227 tar -xC $(prefix)/opt -f $(builddir)/bin/VirtualBox.tar
228 install -d -g 0 -o 0 $(prefix)/usr/share/applications
229 install -d -g 0 -o 0 $(prefix)/usr/lib
230 install -d -g 0 -o 0 $(prefix)/usr/bin
231 install -d -g 0 -o 0 $(prefix)/usr/share/$(package)
232 install -d -g 0 -o 0 $(prefix)/usr/share/doc/$(verpkg)
233 $(if $(NOQT),,mv $(archdir)/virtualbox.desktop \
234 $(prefix)/usr/share/applications/virtualbox.desktop)
235 install -d -g 0 -o 0 $(prefix)/usr/share/pixmaps
236 $(if $(NOQT),,install -d -g 0 -o 0 $(prefix)/usr/share/icons/hicolor)
237 $(if $(NOQT),,cp $(archdir)/icons/128x128/virtualbox.png \
238 $(prefix)/usr/share/pixmaps/virtualbox.png)
239 $(if $(NOQT),,mv $(archdir)/nls $(prefix)/usr/share/$(package))
240 $(if $(NOQT),,cd $(archdir)/icons; for i in *; do \
241 for j in $$i/virtualbox.*; do \
242 if [ -f $$j ]; then \
243 if [ ! -d $(prefix)/usr/share/icons/hicolor/$$i/apps ]; then \
244 install -d -g 0 -o 0 $(prefix)/usr/share/icons/hicolor/$$i/apps; \
245 fi; \
246 mv $$j $(prefix)/usr/share/icons/hicolor/$$i/apps; \
247 fi; \
248 done; \
249 install -d -g 0 -o 0 $(prefix)/usr/share/icons/hicolor/$$i/mimetypes; \
250 mv $$i/* $(prefix)/usr/share/icons/hicolor/$$i/mimetypes || true; \
251 rmdir $$i; \
252 done)
253 $(if $(NOQT),,rmdir $(archdir)/icons)
254 $(if $(NOQT),,mv $(archdir)/virtualbox.xml $(bldbase)/$(verpkg).sharedmimeinfo)
255 install -d -g 0 -o 0 $(prefix)/usr/share/lintian/overrides
256 sed \
257 -e 's|%VERPKG%|$(verpkg)|g' \
258 $(vboxroot)/debian/lintian-override.in > \
259 $(prefix)/usr/share/lintian/overrides/$(verpkg)
260 mv $(archdir)/VBox.png \
261 $(prefix)/usr/share/pixmaps/VBox.png
262 mv $(archdir)/src $(prefix)/usr/share/$(package)
263 rm $(archdir)/VBox.sh
264 install -D -g 0 -o 0 -m 644 $(instlin)/VBox.sh $(prefix)/usr/bin/VBox
265 mv $(archdir)/VBoxSysInfo.sh $(prefix)/usr/share/$(package)
266 if [ -r $(archdir)/VBoxDTrace ]; then \
267 mv $(archdir)/VBoxDTrace $(prefix)/usr/bin; \
268 fi
269 mv $(archdir)/VBoxTunctl $(prefix)/usr/bin
270 $(if $(NOMODS),,for d in $(moddir)/*; do \
271 if [ -f $$d/vboxdrv.ko -a -f $$d/vboxnetflt.ko -a -f $$d/vboxnetadp.ko ]; then \
272 install -D -g 0 -o 0 -m 0644 \
273 $$d/vboxdrv.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxdrv.ko; \
274 install -D -g 0 -o 0 -m 0644 \
275 $$d/vboxnetflt.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetflt.ko; \
276 install -D -g 0 -o 0 -m 0644 \
277 $$d/vboxnetadp.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxnetadp.ko; \
278 if [ -f $$d/vboxpci.ko ]; then \
279 install -D -g 0 -o 0 -m 0644 \
280 $$d/vboxpci.ko $(prefix)/lib/modules/$$(basename $$d)/misc/vboxpci.ko; \
281 fi \
282 fi \
283 done)
284 dh_installdocs $(addprefix $(archdir)/,UserManual*.pdf LICENSE)
285 mv $(addprefix $(archdir)/,$(if $(HEADLESS),,rdesktop-vrdp.tar.gz) additions/VBoxGuestAdditions.iso) $(prefix)/usr/share/$(package)
286 $(if $(HEADLESS),,mv $(archdir)/rdesktop-vrdp $(prefix)/usr/bin)
287 $(if $(HEADLESS),,mv $(archdir)/rdesktop-vrdp-keymaps $(prefix)/usr/share/$(package))
288 mv $(archdir) $(prefix)/usr/lib/$(package)
289 if [ -f $(prefix)/usr/lib/$(package)/libQt5CoreVBox.so.5 ]; then \
290 $(vboxroot)/tools/linux.$(chrarch)/bin/chrpath \
291 --keepgoing --replace /usr/lib/$(package) \
292 $(prefix)/usr/lib/$(package)/*.so.5 \
293 $(prefix)/usr/lib/$(package)/plugins/platforms/*.so; \
294 $(prefix)/usr/lib/$(package)/plugins/platformthemes/*.so; \
295 $(prefix)/usr/lib/$(package)/plugins/sqldrivers/*.so; \
296 $(prefix)/usr/lib/$(package)/plugins/styles/*.so; \
297 $(prefix)/usr/lib/$(package)/plugins/xcbglintegrations/*.so; \
298 echo "[Paths]" > $(prefix)/usr/lib/$(package)/qt.conf; \
299 echo "Plugins = /usr/lib/$(package)/plugins" >> $(prefix)/usr/lib/$(package)/qt.conf; \
300 fi
301 export VBOX_INSTALL_PATH=/usr/lib/$(package) && \
302 cd $(builddir)/bin/sdk/installer && \
303 $(PYTHON) ./vboxapisetup.py install --root $(prefix)
304 rm -rf $(prefix)/usr/lib/$(package)/sdk/installer
305 ln -s ../VBoxVMM.so $(prefix)/usr/lib/$(package)/components/VBoxVMM.so
306 rmdir $(prefix)/opt
307 dh_link \
308 $(if $(NOQT),,usr/bin/VBox usr/bin/VirtualBox) \
309 $(if $(NOQT),,usr/bin/VBox usr/bin/virtualbox) \
310 $(if $(NOQT),,usr/bin/VBox usr/bin/VirtualBoxVM) \
311 $(if $(NOQT),,usr/bin/VBox usr/bin/virtualboxvm) \
312 usr/bin/VBox usr/bin/VBoxManage \
313 usr/bin/VBox usr/bin/vboxmanage \
314 $(if $(NOSDL),,usr/bin/VBox usr/bin/VBoxSDL) \
315 $(if $(NOSDL),,usr/bin/VBox usr/bin/vboxsdl) \
316 usr/bin/VBox usr/bin/VBoxHeadless \
317 usr/bin/VBox usr/bin/vboxheadless \
318 usr/bin/VBox usr/bin/VBoxBugReport \
319 usr/bin/VBox usr/bin/vboxbugreport \
320 usr/bin/VBox usr/bin/VBoxBalloonCtrl \
321 usr/bin/VBox usr/bin/vboxballoonctrl \
322 usr/bin/VBox usr/bin/VBoxAutostart \
323 usr/bin/VBox usr/bin/vboxautostart \
324 $(if $(NOWEBSVC),,usr/bin/VBox usr/bin/vboxwebsrv) \
325 $(if $(NOVBOXIMG),,usr/lib/virtualbox/vbox-img usr/bin/vbox-img) \
326 $(if $(NOVBOXIMGMOUNT),,usr/lib/virtualbox/vboximg-mount usr/bin/vboximg-mount) \
327 usr/share/virtualbox/src/vboxhost usr/src/vboxhost-$(ver)
328 $(if $(NOMODS),,dh_installmodules)
329 rm -f $(bldbase)/changelog
330 sed -e 's|%VER%|$(debver)|g' \
331 -e 's|%DATE%|$(shell date -R)|g' \
332 -e 's|%DEBREL%|$(subst _,~,$(debrel))|g' \
333 -e 's|%VERPKG%|$(verpkg)|g' \
334 $(debroot)/debian/changelog.in > $(bldbase)/changelog
335 dh_installdebconf
336 dh_installchangelogs
337 dh_installmenu
338 dh_installmime
339 dh_link
340 ifeq ($(DEBUG),)
341 dh_strip --keep-debug \
342 $(addprefix --exclude=lib,$(addsuffix VBox.so.5,\
343 Qt5Core Qt5Gui Qt5Widgets Qt5PrintSupport Qt5OpenGL Qt5DBus Qt5XcbQpa Qt5X11Extras))
344 endif
345 mkdir -p $(bldbase)/$(verpkg)-dbg/usr/lib/$(package)
346 mv $(prefix)/usr/lib/$(package)/*.debug $(bldbase)/$(verpkg)-dbg/usr/lib/$(package)
347 ifeq ($(DEBUG),)
348 mv $(prefix)/usr/lib/debug $(bldbase)/$(verpkg)-dbg/usr/lib
349 endif
350 $(firstword $(shell which dh_python3) $(shell which dh_python2))
351 dh_compress -X.pdf -X.qch -X.qhc -X LICENSE -X.py
352 dh_fixperms
353 dh_makeshlibs
354 dh_installdeb
355 dh_perl
356 # For some reason, the Qt libraries couldn't be found on newer releases (e.g. Ubuntu hardy).
357 # Python is deliberately not listed as a dependency (see also comment in the "control" file.
358 # It is expected that dh_gencontrol shows a warning "substitution variable ${python:Versions}
359 # used, but is not defined" because of this.
360 LD_LIBRARY_PATH=$(prefix)/usr/lib/virtualbox dh_shlibdeps --exclude=VBoxPython
361 dh_gencontrol -- \
362 -Valsa=$(if $(HEADLESS),,libasound2) \
363 -Vpulse=$(if $(HEADLESS),,libpulse0) \
364 -Vsdlttf=$(if $(HEADLESS),,libsdl-ttf2.0-0)
365 dh_md5sums
366 dh_builddeb --destdir $(pkgdir) -- -Zxz
367 endif
368
369.PHONY: binary configure build clean
370endif
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette